This handles the input for the game such as which keys are held down and buttons for performing actions.