WICG / input-device-capabilities

InputDevice API proposal
MIT License
17 stars 14 forks source link

Consider a hasDeterministicPointerId capability #43

Open RByers opened 1 year ago

RByers commented 1 year ago

From discussion of @bmathwig's DeviceId proposal on blink-dev and in https://github.com/w3c/pointerevents/issues/353

Consider adding a boolean or enum which indicates where PointerEvent#pointerId is coupled to a particular hardware device.

mustaqahmed commented 1 year ago

To me, input-device-capabilities seems to be the best place even for the devideId field. This seems logical because deviceId is about the device firing the event, and not directly related to the pointer event being fired.

We can reserve special values (say -1) to report an unsupported hardware.

One catch with deviceId is that it could be initially unknown because of the hardware limitations @bmathwig observed, so I was unsure whether input-device-capabilities reporting a "changing value" would be acceptable or not. Good news is that we have a closely related Windows API where a field can change values: Devices.Input.MouseCapabilities.SwapButtons.

Thoughts?