Re: [w3c/gamepad] Add buttondown, buttonup, buttonchange, axischange events (#152)

@nondebug commented on this pull request.



> +              <li>Let |button:GamepadButton| be
+              |gamepad|.{{Gamepad/[[buttons]]}}[|buttonIndex|].
+              </li>
+              <li>If |oldButtonValue|[|buttonIndex|] is not equal to
+              |button|.{{GamepadButton/value}}:
+                <ol>
+                  <li>Let |buttonCopy| be a [=new=] {{GamepadButton}} instance
+                  with its {{GamepadButton/value}} attribute initialized to
+                  |button|.{{GamepadButton/value}}, its
+                  {{GamepadButton/pressed}} attribute initialized to
+                  |button|.{{GamepadButton/pressed}}, and its
+                  {{GamepadButton/touched}} attribute initialized to
+                  |button|.{{GamepadButton/touched}}.
+                  </li>
+                  <li>[=Queue a task=] on the [=gamepad task source=] to [=fire
+                  an event=] named {{buttonchange}} at |gamepad| using

I think `buttonchange` should only fire for `value` changes and we should add touch events if needed.

The current gamepad market doesn't have many gamepads that detect touch separately from pressure so I think the potential for a gamepad to fire `buttontouchdown` without `buttonchange` is pretty low.

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

Received on Tuesday, 27 July 2021 20:51:18 UTC