The Wacom Bluetooth Keyboard matches the "Wacom class" and so is bound to the
xf86-input-wacom driver. This driver is not designed to work with keyboards,
so we narrow the set of devices our InputClasses will match. Because we need
to match tablets, touchpads, and touchscreens (pad devices are a special case
of tablet) but there is no way to specify an "or" match we duplicate existing
classes and assign one of the above types to each.

Note that simply adding 'MatchIsKeyboard "false"' to our existing snippets
would cause devices like the Cintiq 24HDT Pad and Cintiq 27QHDT Pad from
binding to our driver since both are recognized as (partial) keyboards due
to the presence of KEY_* kernel events.

Fixes: https://sourceforge.net/p/linuxwacom/bugs/294/
Fixes: https://github.com/linuxwacom/xf86-input-wacom/issues/1

Signed-off-by: Jason Gerecke <jason.gere...@wacom.com>
---
Changes from v1:
 * No longer specifically rebinding non-tablet keyboards to another driver.
   Instead, duplicate relevant InputClasses and have each match a narrower
   subset of devices (tablet, touchscreen, xor touchpad).

 conf/50-wacom.conf | 54 +++++++++++++++++++++++++++++++++++++++++++++++++-----
 1 file changed, 49 insertions(+), 5 deletions(-)
From 01b6ad517348bc167ab1bd338429ce4861c9e462 Mon Sep 17 00:00:00 2001
From: Jason Gerecke <killert...@gmail.com>
Date: Wed, 24 Feb 2016 10:43:24 -0800
Subject: [PATCH v2] conf: Prevent xf86-input-wacom from binding to pure-keyboard
 devices

The Wacom Bluetooth Keyboard matches the "Wacom class" and so is bound to the
xf86-input-wacom driver. This driver is not designed to work with keyboards,
so we narrow the set of devices our InputClasses will match. Because we need
to match tablets, touchpads, and touchscreens (pad devices are a special case
of tablet) but there is no way to specify an "or" match we duplicate existing
classes and assign one of the above types to each.

Note that simply adding 'MatchIsKeyboard "false"' to our existing snippets
would cause devices like the Cintiq 24HDT Pad and Cintiq 27QHDT Pad from
binding to our driver since both are recognized as (partial) keyboards due
to the presence of KEY_* kernel events.

Fixes: https://sourceforge.net/p/linuxwacom/bugs/294/
Fixes: https://github.com/linuxwacom/xf86-input-wacom/issues/1

Signed-off-by: Jason Gerecke <jason.gere...@wacom.com>
---
Changes from v1:
 * No longer specifically rebinding non-tablet keyboards to another driver.
   Instead, duplicate relevant InputClasses and have each match a narrower
   subset of devices (tablet, touchscreen, xor touchpad).

 conf/50-wacom.conf | 54 +++++++++++++++++++++++++++++++++++++++++++++++++-----
 1 file changed, 49 insertions(+), 5 deletions(-)

diff --git a/conf/50-wacom.conf b/conf/50-wacom.conf
index fc0eed2..a20e3a3 100644
--- a/conf/50-wacom.conf
+++ b/conf/50-wacom.conf
@@ -1,24 +1,69 @@
+# Some of the below input classes appear 3x times, once for each of
+# "tablet", "touchscreen", and "touchpad" to ensure that the Wacom
+# driver is not accidentally bound to other types of hardware that
+# Wacom has made which are not handled by the wacom driver (e.g the
+# Wacom Bluetooth Keyboard)
+#
+# https://sourceforge.net/p/linuxwacom/bugs/294/
+
 Section "InputClass"
-        Identifier "Wacom USB device class"
+        Identifier "Wacom USB tablet class"
         MatchUSBID "056a:*"
         MatchDevicePath "/dev/input/event*"
+        MatchIsTablet "true"
         Driver "wacom"
 EndSection
 
 Section "InputClass"
-        Identifier "Wacom PnP device class"
-        MatchPnPID "WACf*|WCOM*|WACM*|FUJ02e5|FUJ02e7|FUJ02e9"
+        Identifier "Wacom USB touchscreen class"
+        MatchUSBID "056a:*"
         MatchDevicePath "/dev/input/event*"
+        MatchIsTouchscreen "true"
         Driver "wacom"
 EndSection
 
 Section "InputClass"
-	Identifier "Wacom class"
+        Identifier "Wacom USB touchpad class"
+        MatchUSBID "056a:*"
+        MatchDevicePath "/dev/input/event*"
+        MatchIsTouchpad "true"
+        Driver "wacom"
+EndSection
+
+Section "InputClass"
+	Identifier "Wacom tablet class"
+	MatchProduct "Wacom|WACOM|PTK-540WL|ISD-V4"
+	MatchDevicePath "/dev/input/event*"
+	MatchIsTablet "true"
+	Driver "wacom"
+EndSection
+
+Section "InputClass"
+	Identifier "Wacom touchscreen class"
+	MatchProduct "Wacom|WACOM|PTK-540WL|ISD-V4"
+	MatchDevicePath "/dev/input/event*"
+	MatchIsTouchscreen "true"
+	Driver "wacom"
+EndSection
+
+Section "InputClass"
+	Identifier "Wacom touchpad class"
 	MatchProduct "Wacom|WACOM|PTK-540WL|ISD-V4"
 	MatchDevicePath "/dev/input/event*"
+	MatchIsTouchpad "true"
 	Driver "wacom"
 EndSection
 
+# Serial Wacom devices should always be one of tablet, touchscreen, or
+# touchpad so we can safely get away with just one match section in
+# these cases
+Section "InputClass"
+        Identifier "Wacom PnP device class"
+        MatchPnPID "WACf*|WCOM*|WACM*|FUJ02e5|FUJ02e7|FUJ02e9"
+        MatchDevicePath "/dev/input/event*"
+        Driver "wacom"
+EndSection
+
 Section "InputClass"
 	Identifier "Wacom serial class"
 	MatchProduct "Serial Wacom Tablet"
@@ -56,4 +101,3 @@ Section "InputClass"
 	Driver "wacom"
 	Option "Button2" "3"
 EndSection
-
-- 
2.8.0

------------------------------------------------------------------------------
Find and fix application performance issues faster with Applications Manager
Applications Manager provides deep performance insights into multiple tiers of
your business applications. It resolves application problems quickly and
reduces your MTTR. Get your free trial!
https://ad.doubleclick.net/ddm/clk/302982198;130105516;z
_______________________________________________
Linuxwacom-devel mailing list
Linuxwacom-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linuxwacom-devel

Reply via email to