Inputting text and commands from a keyboard