Skip to content

Commit

Permalink
Add extended buttons to support trackpad (w3c#191)
Browse files Browse the repository at this point in the history
  • Loading branch information
xingri committed Mar 13, 2024
1 parent c207166 commit 9e94eb6
Show file tree
Hide file tree
Showing 8 changed files with 5,742 additions and 226 deletions.
912 changes: 912 additions & 0 deletions amazon_luna_gamepad.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
162 changes: 162 additions & 0 deletions extensions.html
Original file line number Diff line number Diff line change
Expand Up @@ -649,6 +649,168 @@ <h2>
</p>
</dd>
</section>
<section>
<h2>
"extended" Gamepad Buttons Mapping
</h2>
<p>
This section defines extended gamepad buttons mapping beyonds the Standard Gamepads layout,
but are commonly found on some gamepad models .The <code>_ext</code> suffix is used to indicate
that they are extensions to the core specification.
</p>
<p>
The following table lists some examples of gamepad models that defines extended buttons. This is not an exhaustive list,
and user agents MAY use different or additional buttons for these or other gamepad models.
</p>
<table class="simple">
<thead>
<tr>
<th scope="col">Buttons</th>
<th scope="col">Mapping</th>
<th scope="col">Type</th>
</tr>
</thead>
<tbody>
<tr>
<td>buttons[0]</td>
<td>diamond_down</td>
<td>Standard: Bottom button in right cluster</td>
</tr>
<tr>
<td>buttons[1]</td>
<td>diamond_right</td>
<td>Standard: Right button in right cluster</td>
</tr>
<tr>
<td>buttons[2]</td>
<td>diamond_left</td>
<td>Standard: Left button in right cluster</td>
</tr>
<tr>
<td>buttons[3]</td>
<td>diamond_up</td>
<td>Standard: Top button in right cluster</td>
</tr>
<tr>
<td>buttons[4]</td>
<td>shoulder_left</td>
<td>Standard: Top left front button</td>
</tr>
<tr>
<td>buttons[5]</td>
<td>shoulder_right</td>
<td>Standard: Top right front button</td>
</tr>
<tr>
<td>buttons[6]</td>
<td>trigger_left</td>
<td>Standard: Bottom left front button</td>
</tr>
<tr>
<td>buttons[7]</td>
<td>trigger_right</td>
<td>Standard: Bottom right front button</td>
</tr>
<tr>
<td>buttons[8]</td>
<td>select</td>
<td>Standard: Left button in center cluster</td>
</tr>
<tr>
<td>buttons[9]</td>
<td>start</td>
<td>Standard: Right button in center cluster</td>
</tr>
<tr>
<td>buttons[10]</td>
<td>thumbstick_left</td>
<td>Standard: Left stick pressed button</td>
</tr>
<tr>
<td>buttons[11]</td>
<td>thumbstick_right</td>
<td>Standard: Right stick pressed button</td>
</tr>
<tr>
<td>buttons[12]</td>
<td>dpad_up</td>
<td>Standard: Top button in left cluster</td>
</tr>
<tr>
<td>buttons[13]</td>
<td>dpad_down</td>
<td>Standard: Bottom button in left cluster</td>
</tr>
<tr>
<td>buttons[14]</td>
<td>dpad_left</td>
<td>Standard: Left button in left cluster</td>
</tr>
<tr>
<td>buttons[15]</td>
<td>dpad_right</td>
<td>Standard: Right button in left cluster</td>
</tr>
<tr>
<td>buttons[16]</td>
<td>system</td>
<td>Standard: Center button in center cluster</td>
</tr>
<tr>
<td>buttons[17]</td>
<td>trackpad</td>
<td>Extended: Touchpad, Sony DualSense, DualShock 4</td>
</tr>
<tr>
<td>buttons[18]</td>
<td>squeeze_left</td>
<td>Extended: Back buttons, PlayStation DualSense Edge</td>
</tr>
<tr>
<td>buttons[19]</td>
<td>squeeze_right</td>
<td>Extended: Back buttons, PlayStation DualSense Edge</td>
</tr>
<tr>
<td>buttons[20]</td>
<td>squeeze_left_upper</td>
<td>Extended: Paddles, Xbox Elite Wireless Controller</td>
</tr>
<tr>
<td>buttons[21]</td>
<td>squeeze_left_lower</td>
<td>Extended: Paddles, Xbox Elite Wireless Controller</td>
</tr>
<tr>
<td>buttons[22]</td>
<td>squeeze_right_upper</td>
<td>Extended: Paddles, Xbox Elite Wireless Controller</td>
</tr>
<tr>
<td>buttons[23]</td>
<td>squeeze_right_lower</td>
<td>Extended: Paddles, Xbox Elite Wireless Controller</td>
</tr>
<tr>
<td>buttons[24]</td>
<td>share_ext</td>
<td>Extended:<br>
"Share" button, Xbox Wireless Controller Model 1914<br>
"Capture" button, Nintendo Switch controllers<br>
"Capture" button, Stadia controller<br>
</td>
</tr>
<tr>
<td>buttons[25]</td>
<td>assistant_ext</td>
<td>Extended:<br>
Google Assistant button, Google Stadia Controller<br>
Alexa Push-to-talk button, Amazon Luna Controller<br>
</td>
</tr>
</tbody>
</table>
</section>
<section>
<h3>
Glossary
Expand Down
Loading

0 comments on commit 9e94eb6

Please sign in to comment.