move keypress handling into the game