WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
NEW
266293
Gamepad: Map DualShock/DualSense Trackpad Button
https://bugs.webkit.org/show_bug.cgi?id=266293
Summary
Gamepad: Map DualShock/DualSense Trackpad Button
James Howard
Reported
2023-12-12 10:29:34 PST
On Sony gamepads, the trackpad is itself a clickable button. This is independent of the multitouch behavior of the trackpad[^1]. Chromium maps this trackpad click as button 17 in the standard gamepad mapping. In WebKit, the trackpad button is unmapped[^2]. I notice that the Gamepad spec[^3] now says that user agents can choose to map exactly the 16 buttons regardless of what the controller supports as a fingerprinting mitigation, so maybe it makes sense to get button 17 added to the spec as part of the standard mapping, or else always make the buttons array be 17 elements long for all controller types. Steps to reproduce: 1. Connect a Sony DualShock 4 or Sony DualSense controller via USB or BT. 2. Navigate to
https://gamepad-tester.com
3. Press any button on controller to get page to recognize it. 4. Press the trackpad button. Results: Safari Technology Preview 184, macOS 14.1.1: Nothing happens. Chrome 120.0.6099.71, macOS 14.1.1: Button 17 value toggles between 0.0 and 1.0 when pressed. Why do we want this: Some games make use of the trackpad button. [^1]:
https://knyg.github.io/gamepad/extensions.html#gamepadtouch-interface
[^2]:
https://github.com/WebKit/WebKit/blob/ed54b0254b83b2ea15aa23354e1e0c91f1d8dfaf/Source/WebCore/platform/gamepad/cocoa/GameControllerGamepad.mm#L57
[^3]:
https://w3c.github.io/gamepad/#fingerprinting-mitigation
Attachments
Add attachment
proposed patch, testcase, etc.
Marcos Caceres
Comment 1
2023-12-14 17:57:07 PST
James, would you mind filing a bug on the spec?
https://github.com/w3c/gamepad/issues
Sounds like we need to update the spec in parallel.
Marcos Caceres
Comment 2
2023-12-18 18:35:22 PST
Filed spec issue
https://github.com/w3c/gamepad/issues/191
James Howard
Comment 3
2023-12-18 18:54:13 PST
Thanks for doing that for me, Marcos :)
Radar WebKit Bug Importer
Comment 4
2023-12-19 10:30:14 PST
<
rdar://problem/119876782
>
Byungseon(Sun) Shin
Comment 5
2024-05-10 16:07:14 PDT
Will work on by the W3C working group proposal. -
https://github.com/w3c/gamepad/pull/196
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug