← Back to release summary

PointerEvent.persistentDeviceId for Multi-Pen Inking

Category
User input
Type
New or changed feature
Status
Enabled by default (Chrome 128)
Intent stage
Dev trials

Summary

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. This feature is an extension to the PointerEvent interface to include a new attribute, persistentDeviceId, that represents a session-persistent, document isolated, unique identifier that a developer can reliably use to identify individual pens interacting with the page.

Motivation

Currently, developers have no way to distinguish between two individual pens on an ink-enabled digitizer. The existing PointerEvent.id attribute is implemented in different ways and does not always persist for each ink stroke or interaction with the screen. Developers can use this change to have a secure and reliable way to identify individual pen (pointers) interacting with the screen in order to set specific colors or pen shapes for each device interacting with the digitizer.

Standards & signals

Explainers: https://github.com/WICG/pointer-event-extensions/blob/main/pointer-event-device-id-explainer.md

View on chromestatus.com