diff options
author | Jason Gerecke <killertofu@gmail.com> | 2017-10-03 13:45:37 -0700 |
---|---|---|
committer | Jason Gerecke <killertofu@gmail.com> | 2017-11-09 14:13:29 -0800 |
commit | 4a96a58f2693b291b91e21b7e34f5c5e04015f3f (patch) | |
tree | 56b80d87cca9838c0a86936f805af4ba3c871a06 | |
parent | 48c2cd83ccf797fe618a48a743afee35883aecf9 (diff) | |
download | xf86-input-wacom-4a96a58f2693b291b91e21b7e34f5c5e04015f3f.tar.gz |
Add support for kernel's new BTN_STYLUS3 event
BTN_STYLUS3 was (will be) added to the Linux 4.15 kernel to support the
third button present on Wacom's "Pro Pen 3D" stylus. This commit adds
support for this new event, mapping it to mouse button 8 ("navigate
back"). Remapping this button to a different function is possible by
using commands like `xsetwacom set <id> button 8 <action>`.
Signed-off-by: Jason Gerecke <jason.gerecke@wacom.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
-rw-r--r-- | src/wcmUSB.c | 4 | ||||
-rw-r--r-- | src/xf86WacomDefs.h | 6 |
2 files changed, 10 insertions, 0 deletions
diff --git a/src/wcmUSB.c b/src/wcmUSB.c index 0b5ec57..2f96a8a 100644 --- a/src/wcmUSB.c +++ b/src/wcmUSB.c @@ -1454,6 +1454,10 @@ static void usbParseKeyEvent(WacomCommonPtr common, ds->buttons = mod_buttons(ds->buttons, 2, event->value); break; + case BTN_STYLUS3: + ds->buttons = mod_buttons(ds->buttons, 3, event->value); + break; + default: change = 0; } diff --git a/src/xf86WacomDefs.h b/src/xf86WacomDefs.h index ec34211..a772597 100644 --- a/src/xf86WacomDefs.h +++ b/src/xf86WacomDefs.h @@ -93,6 +93,12 @@ #define ABS_MT_SLOT 0x2f #endif +/* 4.15 */ + +#ifndef BTN_STYLUS3 +#define BTN_STYLUS3 0x149 +#endif + /****************************************************************************** * Forward Declarations *****************************************************************************/ |