Windows Pen Designs
This topic presents information about the pen devices that are compatible with Windows 10.
Physical Design
The physical pen device that the user interacts with may have a variety of industrial designs. However all compatible integrated Windows 10 pen devices have a pressure sensitive tip and an erase affordance. The erase affordance can be implemented as a physical button on the pen, or as a tail-end eraser (similar to a traditional pencil). The following image illustrates these potential implementations; a pen with a tail-end eraser on the left and a pen with an eraser button on the right.
For information about the erase affordance, the barrel button, and how to report pressure, see Windows Pen States.
Button Placement
If implementing a Bluetooth button to support the quick launch features of Windows Ink Workspace, please ensure that the button is placed at the tail-end of the pen device as shown in the above figure.
Note
Bluetooth buttons should not be placed on the side of the barrel, nor should barrel buttons utilized for selection or erase be overloaded with functionality that depends on the pen’s position/state, as this typically leads to a subpar user experience.
Bluetooth Button Implementation
To implement a tail-end Bluetooth button, the device will report 3 distinct keyboard combinations corresponding to 3 distinct button actions via a HID Bluetooth LE keyboard device exposed to the host. The actions and corresponding keyboard combinations are outlined below:
Bluetooth Button Action | Key Combination to Report |
---|---|
Single-click | WIN+F20 |
Double-click | WIN+F19 |
Press and hold | WIN+F18 |
Pen Stowage
Starting with Windows 10, version 1903, Windows supports notifications for devices incorporating compatible pen stowage. The mechanism relies on the hardware detecting the pen being removed or replaced and generating a corresponding HID keyboard report for a pair of shortcut combinations. To signal a dock (pen replaced in stowage), report WIN+CTRL+F20 and to signal an undock (pen removed from stowage), report WIN+CTRL+F19. This can be implemented with firmware or a driver.
These undock/dock events bring-up/dismiss the Shell ink workspace menu. Starting with Windows 10, version 2004 Office also reacts to these events by using a platform API that enables any developer to extend their application for awareness of stowage events. There is no support to query whether the pen is present in the dock, apps are only notified of removal and return events if they are in the foreground.
Reporting Battery Level
A pen's battery level may be reported via Bluetooth LE Battery Service 0x180F and using Battery Level (0-100%) 0x2A19 for paired devices (keyboards, mice, pens, external PTPs, radial controllers, etc.)
When reported via the above, Windows will communicate the current battery level to users in two ways.
First, users can view the current battery level by going to the Bluetooth & devices > Devices settings page. An example pen entry is shown below:
In addition, when a pen's battery drops to 5% or lower, a Windows notification will be shown to the user indicating that the battery is low. Similary, this same notification will be shown if a pen's battery is at or below 5% battery when first paired.
Note
Users may disable the low-battery notification, in which case they must go to the Bluetooth & devices > Devices settings page to view the battery level.