Intent to Prototype: Gamepad Button and Axis Events

65 views
Skip to first unread message

Matt Reynolds

unread,
Aug 10, 2021, 7:07:00 PM8/10/21
to blink-dev

Contact emails

mattre...@chromium.org, jamesh...@chromium.org


Explainer

https://docs.google.com/document/d/1GUeLs5RXdTlaiLgyBf6FUdJXu71dzCpsiLkawkCLAXA/view


Specification

https://github.com/w3c/gamepad/pull/152


API spec

Yes


Design docs

https://docs.google.com/document/d/1rnQ1gU0iwPXbO7OvKS6KO9gyfpSdSQvKhK9_OkzUuKE


Summary

This proposal adds input events for gamepad button and axis inputs.


Blink component

Blink>GamepadAPI


Motivation

The current polling-based model for Gamepad API inputs requires applications to repeatedly fetch and compare the full gamepad state in order to detect button presses and axis movements.


Providing an alternative event-based model allows applications to remove the polling loop and only respond to relevant events. Applications switching from polling to events may also see a reduction in average input latency.


Initial public proposal

https://github.com/w3c/gamepad/issues/4


An earlier intent was sent for this feature but the implementation was not completed.


Search tags

gamepad, button, axis, event


TAG review

https://github.com/w3ctag/design-reviews/issues/662


TAG review status

Pending


Risks



Interoperability and Compatibility



Gecko: Positive (https://lists.w3.org/Archives/Public/public-webapps/2015AprJun/0091.html) Mozilla has publicly indicated support for gamepad input events and Firefox includes a prototype implementation (enable dom.gamepad.non_standard_events.enabled) with events gamepadaxismove, gamepadbuttondown and gamepadbuttonup.


WebKit: No signal


Web developers: Positive (https://lists.w3.org/Archives/Public/public-webapps/2015AprJun/0072.html) This feature was requested by Scirra.


Is this feature fully tested by web-platform-tests?

Web platform tests will be added with the prototype implementation.


Flag name

chrome://flags/#enable-gamepad-button-axis-events


Requires code in //chrome?

False


Tracking bug

https://crbug.com/1210922


Launch bug

https://crbug.com/857208


Link to entry on the Chrome Platform Status

https://chromestatus.com/feature/5989275208253440

Reply all
Reply to author
Forward
0 new messages