Re: [w3c/gamepad] Add extended buttons to support trackpad (#191) (PR #196)

xingri left a comment (w3c/gamepad#196)

  Thanks @marcoscaceres ,  I’ve rebased the branch onto current gh-pages and updated the initialization algorithm following your suggestions.

For your question about "standard", I intend it to require both gamepad.mapping === "standard" and a corresponding input mapped to its canonical Standard Gamepad index. I’ve added that mapping check to the button-creation steps and clarified the enum description. Position alone does not qualify.

The index-assignment loop now uses the original standard-button test, and each button’s type is determined where the GamepadButton is created. Empty entries and duplicate standard inputs mapped outside their canonical index remain "non-standard".

I’ve also added the getter steps, specified that the type remains fixed for the object’s lifetime, defined trackpad buttons in terms of trackpad or touchpad clicks, and removed home buttons from the additional-button examples.

I checked both implementations: Chromium<https://crrev.com/c/7760763>’s normal mapping path matches this classification rule. WebKit<https://github.com/WebKit/WebKit/pull/65693> follows the mapping-based approach but still needs a presence check for missing controls.

Could you take another look, particularly at the clarified "standard" semantics?


-- 
Reply to this email directly or view it on GitHub:
https://github.com/w3c/gamepad/pull/196#issuecomment-6995363627
You are receiving this because you are subscribed to this thread.

Message ID: <w3c/gamepad/pull/196/c6995363627@github.com>

Received on Thursday, 19 November 2026 00:05:36 UTC