Fix keypresses not registering when cursor is outside of the game window

Keypresses should be registered regardless of the mouse position. They should only depend on the focus of the window.