← Back to release summary

Gamepad Event-Driven Input API

Category
Device
Type
New or changed feature
Status
In development (Chrome In development)
Intent stage
Start incubating

Summary

This proposal extends the Gamepad API with a new event-driven model that enables applications to receive gamepad input with lower latency. Instead of relying on frequent polling via navigator.getGamepads(), developers can now listen for a rawgamepadinputchange event, which fires whenever new input data is available from the device. This allows for more responsive input handling, particularly in latency-sensitive applications.

Motivation

The current Gamepad API relies on a polling-based model, where applications must repeatedly call navigator.getGamepads() and compare the entire gamepad state to detect changes such as button presses or axis movements. Introducing an event-driven alternative would allow applications to respond directly to meaningful input changes without relying on a polling loop. This approach not only simplifies input handling but may also help reduce average input latency.

Standards & signals

Samples: https://gabrielsanbrito.github.io/gamepad-raw-input-events

Explainers: https://github.com/MicrosoftEdge/MSEdgeExplainers/blob/main/GamepadEventDrivenInputAPI/explainer.md

View on chromestatus.com