The Gamepad API is a way for developers to access and respond to signals from gamepads and other game controllers in a simple, consistent way. It contains three interfaces, two events and one specialist function, to respond to gamepads being connected and disconnected, and to access other information about the gamepads themselves, and what buttons and other controls are currently being pressed.
GamepadRepresents a gamepad/controller connected to the computer.
Represents a button on one of the connected controllers.
GamepadEventThe event object representing events fired that are related to gamepads.
GamepadHapticActuatorRepresents hardware in the controller designed to provide haptic feedback to the user (if available), most commonly vibration hardware.
GamepadPoseRepresents the pose of a controller (e.g., position and orientation in 3D space) in the case of a WebVR controller. This is not used by the newer WebXR standard.
An extension to the Navigator object that returns an array of Gamepad objects, one for each connected gamepad.
gamepadconnectedAn event that will fire when a gamepad is connected.
gamepaddisconnectedAn event that will fire when a gamepad is disconnected.