HID: wacom: generic: add 3 tablet touch keys
authorPing Cheng <pinglinux@gmail.com>
Wed, 15 Feb 2017 05:26:21 +0000 (21:26 -0800)
committerJiri Kosina <jkosina@suse.cz>
Mon, 6 Mar 2017 13:06:51 +0000 (14:06 +0100)
This patch add support to the 3 touch keys on Wacom Cintiq Pro.  These touch
keys are in the middle of the other two keys on the top edge of the tablet.

Signed-off-by: Ping Cheng <ping.cheng@wacom.com>
Reviewed-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Tested-by: Aaron Armstrong Skomra <aaron.skomra@wacom.com>
Acked-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
drivers/hid/wacom_wac.c
drivers/hid/wacom_wac.h
include/uapi/linux/input-event-codes.h

index 4aa3de9f1163b30eb64b4304f285a4167aef0cf0..dbda992723743457f152d2b58a49eea1d302fad0 100644 (file)
@@ -1768,6 +1768,18 @@ static void wacom_wac_pad_usage_mapping(struct hid_device *hdev,
                wacom_map_usage(input, usage, field, EV_ABS, ABS_WHEEL, 0);
                features->device_type |= WACOM_DEVICETYPE_PAD;
                break;
+       case WACOM_HID_WD_BUTTONCONFIG:
+               wacom_map_usage(input, usage, field, EV_KEY, KEY_BUTTONCONFIG, 0);
+               features->device_type |= WACOM_DEVICETYPE_PAD;
+               break;
+       case WACOM_HID_WD_ONSCREEN_KEYBOARD:
+               wacom_map_usage(input, usage, field, EV_KEY, KEY_ONSCREEN_KEYBOARD, 0);
+               features->device_type |= WACOM_DEVICETYPE_PAD;
+               break;
+       case WACOM_HID_WD_CONTROLPANEL:
+               wacom_map_usage(input, usage, field, EV_KEY, KEY_CONTROLPANEL, 0);
+               features->device_type |= WACOM_DEVICETYPE_PAD;
+               break;
        }
 
        switch (equivalent_usage & 0xfffffff0) {
index 857ccee16f389f30c1553750f7c59453ceb3d8a6..5eba31d6c46a233e1e19ecb17c62ae1a1a0fe7af 100644 (file)
 #define WACOM_HID_WD_BATTERY_LEVEL      (WACOM_HID_UP_WACOMDIGITIZER | 0x043b)
 #define WACOM_HID_WD_EXPRESSKEY00       (WACOM_HID_UP_WACOMDIGITIZER | 0x0910)
 #define WACOM_HID_WD_EXPRESSKEYCAP00    (WACOM_HID_UP_WACOMDIGITIZER | 0x0950)
+#define WACOM_HID_WD_CONTROLPANEL       (WACOM_HID_UP_WACOMDIGITIZER | 0x0982)
+#define WACOM_HID_WD_ONSCREEN_KEYBOARD  (WACOM_HID_UP_WACOMDIGITIZER | 0x0983)
+#define WACOM_HID_WD_BUTTONCONFIG       (WACOM_HID_UP_WACOMDIGITIZER | 0x0986)
 #define WACOM_HID_WD_BUTTONHOME         (WACOM_HID_UP_WACOMDIGITIZER | 0x0990)
 #define WACOM_HID_WD_BUTTONUP           (WACOM_HID_UP_WACOMDIGITIZER | 0x0991)
 #define WACOM_HID_WD_BUTTONDOWN         (WACOM_HID_UP_WACOMDIGITIZER | 0x0992)
index 3af60ee69053322b9c6ca72d3120ce9f23da1c80..f5a8d96e1e098543d7cad6af1d7a77b117701f40 100644 (file)
  * e.g. teletext or data broadcast application (MHEG, MHP, HbbTV, etc.)
  */
 #define KEY_DATA                       0x277
+#define KEY_ONSCREEN_KEYBOARD          0x278
 
 #define BTN_TRIGGER_HAPPY              0x2c0
 #define BTN_TRIGGER_HAPPY1             0x2c0