GamepadEvent object

GamepadEvent objects describe the state of the buttons and axes on a gamepad device. Use the buttons property to retrieve an array of GamepadButton objects representing the buttons supported by the Gamepad device.

Syntax


var sEventName = "gamepadconnected";
window.addEventListener(sEventName, function(evt) {
  var gamepadEvent = evt;
});       


DOM Information

Inheritance Hierarchy

 Event
   GamepadEvent

Members

The GamepadEvent object has these types of members:

Properties

The GamepadEvent object has these properties.

PropertyAccess typeDescription

gamepad

Read-only

Description the state of the gamepad device buttons and axes when the event was fired.

 

See also

Event
gamepadconnected event
gamepaddisconnected event

 

 

Show: