Support libwacom "mobile" pen type in Wacom stylus panel (AES pens)
AES pens are an optional accessory for many different tablet PCs, allowing you to directly write on the screen. These pens are now supported in the master branch of libwacom with a new WSTYLUS_MOBILE
stylus type. This new stylus type was introduced to highlight the different construction and abilities of these pens compared to other Wacom styli. Supporting these styli should be relatively straightforward since the fallback codepath seems to already do a reasonable job.
The two main differences to previous styli are the use of only one traditionally-programmable button, and a second button that causes the pen to send events from the Eraser device when held. The following libwacom properties are common to these tools. Two new functions -- libwacom_stylus_get_eraser_type()
and libwacom_stylus_get_paired_ids()
-- were introduced along with the AES pen support to make dealing with eraser buttons and classic invert-style erasers a little easier -- see their documentation. The libwacom_stylus_is_eraser()
and libwacom_stylus_has_eraser()
functions have also been slightly tweaked to better handle these new styli; reading their updated documentation may also be helpful.
libwacom_stylus_get_type() == WSTYLUS_MOBILE
libwacom_stylus_get_num_buttons() == 1
libwacom_stylus_is_eraser() == true
libwacom_stylus_has_eraser() == false
libwacom_stylus_get_eraser_type() == WACOM_ERASER_BUTTON
libwacom_stylus_get_paired_ids() == []
I have attached a set of recordings below which can be fed into libinput replay
to create a virtual AES sensor for development / testing purposes. Playing back the recordings will allow proximity, tip, button, and eraser events to be validated. See its README for more detail of the logical event sequence of each recording.
Before starting development, it will be necessary to install the master branch of libwacom to obtain the necessary API updates, tablet definitions, and stylus definitions. In addition to these styli having the WSTYLUS_MOBILE
type, they also all have one traditionally-programmable side switch and one eraser switch which causes events
Proposed Mockups:
The control center is currently rendering a fallback layout based on other available properties. Purely by coincidence this already produces a reasonable looking result:
Using a similar layout when WSTYLUS_MOBILE
is fully supported should be fine.