#880: Extending the PointerEvent with Unique DeviceId Attribute
Discussions
2023-10-16
Dan: not concerned about persistent device IDs... because it's session scoped.
Rossen: is this part of webapps? Why are they starting with WICG?
Peter: explainer says the expected venue is WICG...
Rossen: pointer events - where is it?
Peter: not sure where current status is....
Peter: pointer events wg still exists and charter expires end of this month...
Dan: the design?
Rossen: the motivation makes total sense –being able to recognize multiple input devices in a session - makes a lot of sense. Pen... gaze... other ways of interacting... The thing that I'm trying to get from the use case...
we look at the example provided in the explainer
Rossen: so it's really just a device id and nothing else - no additional context - you can't treat the input differently...
Dan: you wouldn't be able to determine if a given device is a pen, etc...
Rossen: no - so if you resume editing of the same document you wouldn't get the same context...
Dan: IDs are ephemeral...
Rossen: so if session restarts your colors assigned might swap...
Rossen: in your session - in this use cases - you would have a device and a color ... mapping. That's all the context you have. 1 = blue, 2 = red. No guarantee when you resume your session that device 1 will be the same device you had before...
Peter: minor concern - on difference between pointer ID and device ID. "if the device doesn't support hardware ID then you have a new ID for every event..." And we also have interfaces on element... Just curious about how those values interact. Wondering about the difference between device ID and pointer ID... in the cases where the device does not have a hardware ID... then device ID would always be -1 and pointer ID would be incrementing value... But if it does have a hardware ID then PointerID would be stable... So (a) is pointer ID and device ID ever going to be the same and (b) why is't pointer ID just a flag saying the device ID is stable? So if you have multiple pens (e.g.) with no hardware IDs then they would all be listed as -1 ... so would this even be useful for devices without a hardware ID?
<blockquote> Hi @sahirv - thanks for sending this our way. We discussed in our call todayThe motiviation (user need) seems to make sense.
We wanted to clarify - it seems there is no way to persist device IDs across sessions with the current design. In your example, if your session is interupted your color assigned to each device might swap. Is that the intention?
We're also concerned about the usefulness of this for devices that don't have a hardware ID - since it seems they wouldn't be able to be differentiated within a session?
For devices with a hardware ID, would the deviceId be the same as the pointerId? If so, maybe this could just be a flag indicating that the pointerId is stable? If not, why not?
Also can you clarify where this work will end up for standardization. It seems that this belongs in the Pointer Events Working Group - but that group is due to close off in a month. Is the intention to open up this group again for further updates, or do you envision bringing this to WebApps or some other working group?
</blockquote>2023-12-18
We had a question, Lea left a comment. Could be ready to close. Marked "propose closing".
OpenedJul 28, 2023
こんにちは TAG-さん!
I'm requesting a TAG review of PointerEvent.deviceId.
As devices with advanced pen input capabilities are becoming increasingly prevalent, it is important that the web platform continues to evolve to fully support these advanced features in order to unlock rich experiences for both end users and developers. One such advancement is the ability for a device's digitizer to recognize more than one pen device interacting with it simultaneously. In this Explainer, we propose an extension to the PointerEvent interface to include a new attribute, deviceId, that represents a session-persistent, document isolated, unique identifier that a developer can reliably use to identify individual pens interacting with the page.
Further details:
We'd prefer the TAG provide feedback as (please delete all but the desired option):
💬 leave review feedback as a comment in this issue and @-notify [github usernames]