From ec5d7702ff25787d253f9aad012972f0525c3492 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Thu, 11 Oct 2018 10:21:54 +1000 Subject: [PATCH] quirks: disable debouncing on the VMware Virtual mice At least on MacBooks, the host emulates two clicks 8ms apart in response to a doubletap. Those clicks are filtered by our debouncing code. Since these are emulated devices anyway and by definition cannot have a stuck button, let's tag them so we don't enable the debouncing code. If the button of the physical device is stuck, that's a problem that needs to be fixed in the host system. Fixes #158 Signed-off-by: Peter Hutterer --- meson.build | 1 + quirks/30-vendor-vmware.quirks | 10 ++++++++++ test/litest-device-vmware-virtual-usb-mouse.c | 2 +- 3 files changed, 12 insertions(+), 1 deletion(-) create mode 100644 quirks/30-vendor-vmware.quirks diff --git a/meson.build b/meson.build index 50ff597e..bc136977 100644 --- a/meson.build +++ b/meson.build @@ -261,6 +261,7 @@ quirks_data = [ 'quirks/30-vendor-razer.quirks', 'quirks/30-vendor-synaptics.quirks', 'quirks/30-vendor-wacom.quirks', + 'quirks/30-vendor-vmware.quirks', 'quirks/50-system-acer.quirks', 'quirks/50-system-apple.quirks', 'quirks/50-system-asus.quirks', diff --git a/quirks/30-vendor-vmware.quirks b/quirks/30-vendor-vmware.quirks new file mode 100644 index 00000000..5a3d90e1 --- /dev/null +++ b/quirks/30-vendor-vmware.quirks @@ -0,0 +1,10 @@ +# Do not edit this file, it will be overwritten on update + +[VMWare Virtual PS/2 Mouse] +MatchName=*VirtualPS/2 VMware VMMouse* +ModelBouncingKeys=1 + +[VMware VMware Virtual USB Mouse] +MatchName=*VMware VMware Virtual USB Mouse* +ModelBouncingKeys=1 + diff --git a/test/litest-device-vmware-virtual-usb-mouse.c b/test/litest-device-vmware-virtual-usb-mouse.c index 545316c3..faefda33 100644 --- a/test/litest-device-vmware-virtual-usb-mouse.c +++ b/test/litest-device-vmware-virtual-usb-mouse.c @@ -95,7 +95,7 @@ static int events[] = { TEST_DEVICE("vmware-virtmouse", .type = LITEST_VMWARE_VIRTMOUSE, - .features = LITEST_WHEEL | LITEST_BUTTON | LITEST_ABSOLUTE, + .features = LITEST_WHEEL | LITEST_BUTTON | LITEST_ABSOLUTE | LITEST_NO_DEBOUNCE, .interface = &interface, .name = "VMware VMware Virtual USB Mouse",