Some fixes for the keyboard input.