Changed the way to handle input keys and modifiers
Entirely rewritten using inputText:key:modifiers:client: