updating mouse and keyboard input in game