From 278e608d992d5980bd0edf5965ca0b1fe75290a5 Mon Sep 17 00:00:00 2001 From: tpiekar Date: Sat, 24 Aug 2019 20:08:00 +0200 Subject: [PATCH 1/2] Added special handling for mice connected to the 3Dconnexion universal receiver --- src/dev.c | 5 ++++- src/dev_usb_linux.c | 6 ++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/src/dev.c b/src/dev.c index 466ed42..e628d4c 100644 --- a/src/dev.c +++ b/src/dev.c @@ -227,7 +227,6 @@ static int devid_list[][2] = { * not 6dof space-mice. reported by: Herbert Graeber in github pull request #4 */ static int devid_blacklist[][2] = { - {0x256f, 0xc652}, {0x256f, 0xc650}, /* cadmouse */ {0x256f, 0xc651}, /* cadmouse wireless */ {0x256f, 0xc62c}, /* lipari(?) */ @@ -266,6 +265,10 @@ static int match_usbdev(const struct usb_device_info *devinfo) /* match any device with the new 3Dconnexion device id */ if(vid == VENDOR_3DCONNEXION) { + if (devinfo->productid == 0xc652 && strstr(devinfo->name, "Universal Receiver Mouse")) { + return 0; + } + return 1; } diff --git a/src/dev_usb_linux.c b/src/dev_usb_linux.c index 3b60aed..784f545 100644 --- a/src/dev_usb_linux.c +++ b/src/dev_usb_linux.c @@ -118,6 +118,12 @@ int open_dev_usb(struct device *dev) } } + // Lets ignore all devices with less than 6 axis to avoid the daemon to grab mice + if (dev->num_axes < 6) { + close_evdev(dev); + return -1; + } + /* get number of buttons */ dev->num_buttons = 0; if(ioctl(dev->fd, EVIOCGBIT(EV_KEY, sizeof evtype_mask), evtype_mask) != -1) { From 5b3a76b84d3f4dfff7d4e9f5bff1dad565fd2dfe Mon Sep 17 00:00:00 2001 From: tpiekar Date: Sat, 21 Dec 2019 15:02:27 +0100 Subject: [PATCH 2/2] Removed unnecessary blacklisting of input devices --- src/dev_usb_linux.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/src/dev_usb_linux.c b/src/dev_usb_linux.c index 784f545..3b60aed 100644 --- a/src/dev_usb_linux.c +++ b/src/dev_usb_linux.c @@ -118,12 +118,6 @@ int open_dev_usb(struct device *dev) } } - // Lets ignore all devices with less than 6 axis to avoid the daemon to grab mice - if (dev->num_axes < 6) { - close_evdev(dev); - return -1; - } - /* get number of buttons */ dev->num_buttons = 0; if(ioctl(dev->fd, EVIOCGBIT(EV_KEY, sizeof evtype_mask), evtype_mask) != -1) {