-
Notifications
You must be signed in to change notification settings - Fork 160
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add AES pen IDs #178
Add AES pen IDs #178
Conversation
Name=AES Pen | ||
Group=isdv4-aes | ||
Buttons=1 | ||
IsEraser=true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think IsEraser
is correct here because that is based on the assumption that the pen is always an eraser (like the eraser tip on the other pens). We need some other toggle here for the eraser button.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agreed. It seems like the code implies that IsEraser
is always an eraser, and HasEraser
is never an eraser. I basically flipped a coin on which to use and figured a proper solution would be worked out in #179.
Looking at how GNOME uses it, HasEraser
may be the slightly better choice...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd go with either waiting for #179 or leaving it as false for both right now. I'd lean towards the former, less work overall I reckon.
The ID and eraser tests currently performed by test-stylus-validity are only relevant to EMR tools. To make implementing tests for AES tools more clean, lets first move these into their own dedicated function. Signed-off-by: Jason Gerecke <jason.gerecke@wacom.com>
AES styli are distinct enough from the existing stylus classes to deserve one of their own. This class is named WSTYLUS_MOBILE both to reflect the fact that AES sensors are only found on tablet PCs and to allow the potential inclusion of other similar sensors which may not use AES tech. Stylus test cases are added to cover the future addition of AES styli to libwacom. Signed-off-by: Jason Gerecke <jason.gerecke@wacom.com>
Adds definitions for many different AES styli. The precise information about supported features is hard to come by, but in general most pens have two buttons (one of which is treated as an eraser) and can only report pressure. A few exceptions are known or suspected and their data has been set accordingly. Most of the new entries have comments that list several pens for a single ID. The individual tools could potentially be distinguished with the aid of vendor ID information available in the HID reports, but this data is not forwarded to userspace by the kernel. For each pen I have included additional data in the comments that may or may not be useful. The format of the comments are as follows: OEM1 ; BT device VID | BT device PID [ | FLAGS] ("Model Name" / ModelNumber) OEM2 ; BT device VID | BT device PID [ | FLAGS] ("Model Name" / ModelNumber) etc. For tools with a Bluetooth button, the VID:PID of the emulated keyboard device is given. Tools without such a button use placeholder values of VID_NONE and 0x0000. Additional flags provide further information: * BAT_SWAP / BAT_CHRG: Whether the pen uses replaceable batteries or has an internal rechargeable battery. * BAT_HID / BAT_GATT: Whether the battery level for the Bluetooth button is available through HID or through GATT. * BAT_SHARED: Indicates the pen has a single battery powering both the AES and Bluetooth portions of the pen. * LONGPRESS: Bluetooth button supports the long-press gesture. * PROX: Proximity sensing feature available for Bluetooth button. Signed-off-by: Jason Gerecke <jason.gerecke@wacom.com>
AES sensors determined based on comments and HID descriptors available at the wacom-hid-descriptors repository, where available. Some pen/sensor combinations may not truly be compatible with each other, but it difficult to know a priori which are problematic. This ultimately doesn't matter *too* much, however, since the ID list is primarily used by tools like GNOME Control Center that just need a rough idea of what pens might work with a given tablet during configuration. Signed-off-by: Jason Gerecke <jason.gerecke@wacom.com>
Adds AES pen IDs to the stylus database as well as some additional infrastructure to make them a bit easier to work with. Integrated #177