w3c / gamepad

Gamepad
https://w3c.github.io/gamepad/
Other
139 stars 49 forks source link

Support trackpad touch events / inputs #34

Open kearwood opened 7 years ago

kearwood commented 7 years ago

Many controllers now include trackpads. Some examples:

I would like to extend the Gamepad interface to enumerate the number of trackpads, their shape, arrangement, and capabilities. Capabilities would include the ability to click and ability to detect multiple touches.

This issue is driven initially by the need to support the HTC Vive Controllers for WebVR. The trackpad is fundamental to the usage of the controllers and necessary for the established VR UX paradigms for the platform.

cvan commented 7 years ago

Scattered throughout some issues and PRs elsewhere there's been some discussion about this (and in the w3c/webvr repo).

Also check this mailing list discussion.

daoshengmu commented 7 years ago

In OpenVR SDK 1.0.3, HTC Vive controllers's trackpad has button input and axis movement at VRControllerAxis of VRControllerState. (https://github.com/ValveSoftware/openvr/blob/5bc41e4b55d11dfc8fb4b958a6600aa7f8cee051/headers/openvr.h#L788)

Ideally, we can put them in buttons and axes attribute of gamepad API (https://w3c.github.io/gamepad/#attributes) ?

daoshengmu commented 7 years ago

OpenVR has touched events on its trackpad, and Oculus has touched events on its buttons. We might can support them in the touched attribute of button interface, https://w3c.github.io/gamepad/#gamepadbutton-interface

marcoscaceres commented 5 months ago

Just for reference: https://www.w3.org/TR/pointerevents/#pointerevent-interface

And what's currently in the extension spec: https://w3c.github.io/gamepad/extensions.html#gamepadtouch-interface