|
|
7f8e34 |
From 4a96a58f2693b291b91e21b7e34f5c5e04015f3f Mon Sep 17 00:00:00 2001
|
|
|
7f8e34 |
From: Jason Gerecke <killertofu@gmail.com>
|
|
|
7f8e34 |
Date: Tue, 3 Oct 2017 13:45:37 -0700
|
|
|
7f8e34 |
Subject: [PATCH] Add support for kernel's new BTN_STYLUS3 event
|
|
|
7f8e34 |
|
|
|
7f8e34 |
BTN_STYLUS3 was (will be) added to the Linux 4.15 kernel to support the
|
|
|
7f8e34 |
third button present on Wacom's "Pro Pen 3D" stylus. This commit adds
|
|
|
7f8e34 |
support for this new event, mapping it to mouse button 8 ("navigate
|
|
|
7f8e34 |
back"). Remapping this button to a different function is possible by
|
|
|
7f8e34 |
using commands like `xsetwacom set <id> button 8 <action>`.
|
|
|
7f8e34 |
|
|
|
7f8e34 |
Signed-off-by: Jason Gerecke <jason.gerecke@wacom.com>
|
|
|
7f8e34 |
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
|
7f8e34 |
---
|
|
|
7f8e34 |
src/wcmUSB.c | 4 ++++
|
|
|
7f8e34 |
src/xf86WacomDefs.h | 6 ++++++
|
|
|
7f8e34 |
2 files changed, 10 insertions(+)
|
|
|
7f8e34 |
|
|
|
7f8e34 |
diff --git a/src/wcmUSB.c b/src/wcmUSB.c
|
|
|
7f8e34 |
index 0b5ec57..2f96a8a 100644
|
|
|
7f8e34 |
--- a/src/wcmUSB.c
|
|
|
7f8e34 |
+++ b/src/wcmUSB.c
|
|
|
7f8e34 |
@@ -1454,6 +1454,10 @@ static void usbParseKeyEvent(WacomCommonPtr common,
|
|
|
7f8e34 |
ds->buttons = mod_buttons(ds->buttons, 2, event->value);
|
|
|
7f8e34 |
break;
|
|
|
7f8e34 |
|
|
|
7f8e34 |
+ case BTN_STYLUS3:
|
|
|
7f8e34 |
+ ds->buttons = mod_buttons(ds->buttons, 3, event->value);
|
|
|
7f8e34 |
+ break;
|
|
|
7f8e34 |
+
|
|
|
7f8e34 |
default:
|
|
|
7f8e34 |
change = 0;
|
|
|
7f8e34 |
}
|
|
|
7f8e34 |
diff --git a/src/xf86WacomDefs.h b/src/xf86WacomDefs.h
|
|
|
7f8e34 |
index ec34211..a772597 100644
|
|
|
7f8e34 |
--- a/src/xf86WacomDefs.h
|
|
|
7f8e34 |
+++ b/src/xf86WacomDefs.h
|
|
|
7f8e34 |
@@ -93,6 +93,12 @@
|
|
|
7f8e34 |
#define ABS_MT_SLOT 0x2f
|
|
|
7f8e34 |
#endif
|
|
|
7f8e34 |
|
|
|
7f8e34 |
+/* 4.15 */
|
|
|
7f8e34 |
+
|
|
|
7f8e34 |
+#ifndef BTN_STYLUS3
|
|
|
7f8e34 |
+#define BTN_STYLUS3 0x149
|
|
|
7f8e34 |
+#endif
|
|
|
7f8e34 |
+
|
|
|
7f8e34 |
/******************************************************************************
|
|
|
7f8e34 |
* Forward Declarations
|
|
|
7f8e34 |
*****************************************************************************/
|
|
|
7f8e34 |
--
|
|
|
7f8e34 |
2.14.3
|
|
|
7f8e34 |
|