Originally Posted by
ubootfanat
I might be able to extend your patch to the hid driver to cover the touch cover 2 as well (as soon as I get the kernel compilation to work).
as promised. Got the kernel compiled. there was just some old stuff residing in the boot directory that prevented the kernel to be properly installed.
anyhow: the touchcover 2 works like a charme by slightly enhancing the changeset proposed by PointSource:
Code:
diff --git a/drivers/hid/hid-core.c b/drivers/hid/hid-core.c
index e80da62..54f1cdb 100644
--- a/drivers/hid/hid-core.c
+++ b/drivers/hid/hid-core.c
@@ -1869,6 +1869,9 @@ static const struct hid_device_id hid_have_special_driver[] = {
{ HID_USB_DEVICE(USB_VENDOR_ID_ZEROPLUS, 0x0030) },
{ HID_USB_DEVICE(USB_VENDOR_ID_ZYDACRON, USB_DEVICE_ID_ZYDACRON_REMOTE_CONTROL) },
+/* MS TYPE AND TOUCH COVER 2 INSERTIONS*/
+ { HID_USB_DEVICE(USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_MS_TYPE_COVER_2) },
+ { HID_USB_DEVICE(USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_MS_TOUCH_COVER_2) },
+
{ HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_MS_PRESENTER_8K_BT) },
{ HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_NINTENDO, USB_DEVICE_ID_NINTENDO_WIIMOTE) },
{ HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_NINTENDO2, USB_DEVICE_ID_NINTENDO_WIIMOTE) },
diff --git a/drivers/hid/hid-generic.c b/drivers/hid/hid-generic.c
index e288a4a..fd59518 100644
--- a/drivers/hid/hid-generic.c
+++ b/drivers/hid/hid-generic.c
@@ -24,8 +24,11 @@
#include <linux/hid.h>
+#include "hid-ids.h"
+
static const struct hid_device_id hid_table[] = {
{ HID_DEVICE(HID_BUS_ANY, HID_GROUP_GENERIC, HID_ANY_ID, HID_ANY_ID) },
+ { HID_USB_DEVICE(USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_MS_TYPE_COVER_2), .driver_data = 0 },
+ { HID_USB_DEVICE(USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_MS_TOUCH_COVER_2), .driver_data = 0 },
{ }
};
MODULE_DEVICE_TABLE(hid, hid_table);
diff --git a/drivers/hid/hid-ids.h b/drivers/hid/hid-ids.h
index f0296a5..34b45a5 100644
--- a/drivers/hid/hid-ids.h
+++ b/drivers/hid/hid-ids.h
@@ -603,6 +603,7 @@
#define USB_DEVICE_ID_MS_PRESENTER_8K_USB 0x0713
#define USB_DEVICE_ID_MS_DIGITAL_MEDIA_3K 0x0730
#define USB_DEVICE_ID_MS_COMFORT_MOUSE_4500 0x076c
+#define USB_DEVICE_ID_MS_TOUCH_COVER_2 0x07a7
+#define USB_DEVICE_ID_MS_TYPE_COVER_2 0x07a9
#define USB_VENDOR_ID_MOJO 0x8282
#define USB_DEVICE_ID_RETRO_ADAPTER 0x3201
thanks to PointSource again for working around the issues in the first place!
anyhow: I just am onto a palmblock feature. Created a script that disables the touch input as soon as an event is sent to the deamon. After a certain time, touch is enabled again. The problem is that I have to somehow extract an event which shows me that the stylus is brought to the surface. Has anyone of you an idea on how to trigger a script when there is a motion event coming from the stylus?
- motion event (via xbindkeys) alone will trigger with any mouse input (touchpad, touch and drag, stylus hovering, ...) so that does not work.
- Accessing the /dev/input/mouse0 needs root privileges.
Any other ideas?
Bookmarks