implementing the Gamepad API