Implement key, mouse, and joystick.