demo · v149 · origin trial

Event Inspector

Inspect the raw rawgamepadinputchange event object — its gamepad property, which button or axis triggered it, and how that snapshot compares to what navigator.getGamepads() returns at the same moment. Use keyboard simulation if no physical gamepad is connected.

Source: No gamepad detected
Events: 0 Poll calls: 0 Last event: Gamepad ID:

rawgamepadinputchange event object

Waiting for event…

navigator.getGamepads() snapshot (polled)

Click "Poll snapshot now" or connect a gamepad

Live gamepad state

Buttons (event-driven)

Axes (event-driven)

Keyboard simulation (no gamepad required)

L-stick X: 0.00
L-stick Y: 0.00

Event log

// rawgamepadinputchange event object shape
window.addEventListener('rawgamepadinputchange', (e) => {
  // e is a GamepadEvent
  e.type;         // "rawgamepadinputchange"
  e.timeStamp;    // DOMHighResTimeStamp — sub-frame precision
  e.gamepad;      // Gamepad snapshot at the moment of input

  // Gamepad snapshot
  e.gamepad.id;          // "Xbox Wireless Controller (STANDARD GAMEPAD Vendor:...)"
  e.gamepad.index;       // 0
  e.gamepad.timestamp;   // DOMHighResTimeStamp — same as e.timeStamp
  e.gamepad.connected;   // true
  e.gamepad.buttons;     // GamepadButton[17] — pressed, touched, value
  e.gamepad.axes;        // Float64Array[4] — range -1..1
  e.gamepad.mapping;     // "standard"
});

see also

implementation reference

Need the exact API surface, compatibility boundaries, errors, lifecycle, and source links? Read the matching gendn reference ↗