diff --git a/index.html b/index.html index c75088a..cbc2c71 100644 --- a/index.html +++ b/index.html @@ -1177,8 +1177,11 @@

  • [=list/For each=] |rawInputIndex:long| of [=the range=] from 0 to |inputCount| − 1:
      -
    1. If the the gamepad button at index |rawInputIndex| - [=represents a Standard Gamepad button=]: +
    2. Let |type| be the result of determining if the button at index |rawInputIndex| + [=represents a Standard Gamepad button=] or represents a [=additional gamepad button=]. + If it's neither, use {{GamepadButtonType/"non-standard"}}. +
    3. +
    4. If |type| is not {{GamepadButtonType/"non-standard"}}:
      1. Let |canonicalIndex:long| be the [=canonical index=] for the button. @@ -1235,8 +1238,17 @@

      2. Initialize |buttons| to be an empty [=list=].
      3. [=list/For each=] |buttonIndex:long| of [=the range=] from 0 to - |buttonsSize| − 1, [=list/append=] a [=new=] {{GamepadButton}} to - |buttons|. + |buttonsSize| − 1: +
          +
        1. Let |button:GamepadButton| be a [=new=] {{GamepadButton}} with its + |button|.{{GamepadButton/pressed}} initialized to `false`, + |button|.{{GamepadButton/touched}} initialized to `false`, + |button|.{{GamepadButton/type}} initialized to |type|, and + |button|.{{GamepadButton/value}} initialized to 0. +
        2. +
        3. [=list/Append=] |button| to |buttons|. +
        4. +
      4. Return |buttons|.
      5. @@ -1257,6 +1269,7 @@

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

        @@ -1375,6 +1388,13 @@

      +
      + type attribute +
      +
      + An enumerated {{GamepadButtonType}} attribute that classifies the current button's type in relation to an + extended mapping. +
      @@ -2447,6 +2467,60 @@

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

      + Additional gamepad buttons +

      +

      + This section introduces an extended gamepad button mapping beyond the [=Standard Gamepad=] mapping. + These additional buttons are commonly found on certain gamepad models. + Some examples of these additional buttons include trackpads or touchpads, share or capture buttons, + voice assistant buttons, home buttons, and various squeeze buttons. + 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. +

      +
      +

      + GamepadButtonType Enum +

      +

      + To accommodate additional gamepad buttons, we have defined an enumeration for the various button types termed + {{GamepadButtonType}}, and have expanded the {{GamepadButton}} interface to encompass this new + {{GamepadButtonType}} enumeration. +

      +

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

      +
      +            enum GamepadButtonType {
      +              "non-standard",
      +              "standard",
      +              "trackpad",
      +            };
      +          
      +
      +
      + "standard" +
      +
      + Represent a button has a button type defined in the [=Standard Gamepad=] mapping. +
      +
      + "non-standard" +
      +
      + Represents a button that exists but doesn't have a standard name. +
      +
      + "trackpad" +
      +
      + Represent a trackpad input type. +
      +
      +
      +

      Fingerprinting mitigation