Handle key input better that's more suitable for a game