From 64b7a26a6e8c389334fcc83aba8b404aa8bdbdf4 Mon Sep 17 00:00:00 2001 From: Sun Shin Date: Tue, 5 Mar 2024 09:18:13 -0800 Subject: [PATCH] Add extended buttons to support trackpad (#191) --- index.html | 145 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 145 insertions(+) diff --git a/index.html b/index.html index 4d4318a..6ee48bf 100644 --- a/index.html +++ b/index.html @@ -900,6 +900,7 @@

readonly attribute boolean pressed; readonly attribute boolean touched; readonly attribute double value; + readonly attribute GamepadButtonType type; };

@@ -952,6 +953,17 @@

.. 1.0] + + + [[\type]] + + + `undefined` + + + The button type of the controller. + +
@@ -1018,6 +1030,13 @@

+
+ type attribute +
+
+ An enumerated {{GamepadButtonType}} attribute that classifies the current button's type in relation to an + extended mapping. +

@@ -1944,6 +1963,132 @@

Visual representation of a [=Standard Gamepad=] layout. +
+

+ Extended Mapping +

+

+ This section introduces an extended gamepad button mapping beyond the Standard Gamepad layout. + These additional buttons are commonly found on certain gamepad models. + The following table defines the extended buttons used by some gamepad models in the following diagrams. + It’s important to note that this list is not exhaustive, and user agents may utilize different + or additional buttons for these or other gamepad models. + Consequently, the number of buttons on the Gamepad is not limited to the standard mapping of 17 buttons. +

+

+ To accommodate extended gamepads, we have incorporated an "extended" mapping enumeration + into the GamepadMappingType. Additionally, we have defined an enumeration for the various + button types in the table, termed "GamepadButtonType", and have expanded the "GamepadButton" + interface to encompass this new button type enumeration. +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ButtonsGamepad Models
trackpad/touchpadSony DualSense, DualShock 4
share/captureNintendo Switch controllers
+ Stadia controller
+ Xbox Wireless Controller Model 1914
voice assistantAmazon Luna Controller
+ Google Stadia Controller
+ Nvidia Shield Controller
squeeze_leftPlayStation DualSense Edge
+ Xbox Elite Wireless Controller
squeeze_left_lowerXbox Elite Wireless Controller
squeeze_rightPlayStation DualSense Edge
+ Xbox Elite Wireless Controller
squeeze_right_lowerXbox Elite Wireless Controller
+
+

+ GamepadButtonType Enum +

+

+ This enum defines the set of possible button types. +

+
+            enum GamepadButtonType {
+              "trackpad",
+              "share",
+              "voice_assist",
+              "squeeze_left",
+              "squeeze_left_lower",
+              "squeeze_right",
+              "squeeze_right_lower"
+            };
+          
+
+
+ trackpad +
+
+ This button is being assigned to trackpad button. +
+
+ share +
+
+ This button is being assigned to share or capture button. +
+
+ voice_assist +
+
+ This button is being assigned to voice assistance button. +
+
+ squeeze_left +
+
+ This button is being assigned to the left paddle button on the bottom of the gamepad. +
+
+ squeeze_left_lower +
+
+ This button is being assigned to the lower left paddle button on the bottom of the gamepad. +
+
+ squeeze_right +
+
+ This button is being assigned to the right paddle button on the bottom of the gamepad. +
+
+ squeeze_right_lower +
+
+ This button is being assigned to the lower right paddle button on the bottom of the gamepad. +
+
+
+

Fingerprinting mitigation