Handling input
Handling input from keyboard, mouse and joystick.