Added Input::setPattern() and removePattern()