From 6dcdfdd513fd8158bc7bacbad8c5c8ba987565a0 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Thu, 17 May 2018 12:36:03 +1000 Subject: [PATCH] evdev: add three more Logitech K400-like devices to the debouncing quirk And rename the model flag, no point in having separate flags here, we likely have to add more devices over time. https://bugs.freedesktop.org/show_bug.cgi?id=106534 Signed-off-by: Peter Hutterer --- src/evdev-debounce.c | 3 +-- src/evdev.c | 3 +-- src/evdev.h | 3 +-- udev/90-libinput-model-quirks.hwdb | 10 ++++++++-- 4 files changed, 11 insertions(+), 8 deletions(-) diff --git a/src/evdev-debounce.c b/src/evdev-debounce.c index 6f53cdf8..d2744f22 100644 --- a/src/evdev-debounce.c +++ b/src/evdev-debounce.c @@ -565,8 +565,7 @@ fallback_init_debounce(struct fallback_dispatch *dispatch) struct evdev_device *device = dispatch->device; char timer_name[64]; - if (device->model_flags & - (EVDEV_MODEL_MS_NANO_TRANSCEIVER|EVDEV_MODEL_LOGITECH_K400)) { + if (device->model_flags & EVDEV_MODEL_BOUNCING_KEYS) { dispatch->debounce.state = DEBOUNCE_STATE_DISABLED; return; } diff --git a/src/evdev.c b/src/evdev.c index 728b6f10..c6f76adb 100644 --- a/src/evdev.c +++ b/src/evdev.c @@ -1292,7 +1292,7 @@ evdev_read_model_flags(struct evdev_device *device) MODEL(ALPS_TOUCHPAD), MODEL(SYNAPTICS_SERIAL_TOUCHPAD), MODEL(JUMPING_SEMI_MT), - MODEL(LOGITECH_K400), + MODEL(BOUNCING_KEYS), MODEL(CYBORG_RAT), MODEL(HP_STREAM11_TOUCHPAD), MODEL(LENOVO_T450_TOUCHPAD), @@ -1306,7 +1306,6 @@ evdev_read_model_flags(struct evdev_device *device) MODEL(APPLE_TOUCHPAD_ONEBUTTON), MODEL(LOGITECH_MARBLE_MOUSE), MODEL(TABLET_NO_PROXIMITY_OUT), - MODEL(MS_NANO_TRANSCEIVER), MODEL(TABLET_NO_TILT), MODEL(TABLET_MODE_NO_SUSPEND), MODEL(LENOVO_CARBON_X1_6TH), diff --git a/src/evdev.h b/src/evdev.h index f22bbdb3..0a7de392 100644 --- a/src/evdev.h +++ b/src/evdev.h @@ -111,7 +111,7 @@ enum evdev_device_model { EVDEV_MODEL_ALPS_TOUCHPAD = (1 << 8), EVDEV_MODEL_SYNAPTICS_SERIAL_TOUCHPAD = (1 << 9), EVDEV_MODEL_JUMPING_SEMI_MT = (1 << 10), - EVDEV_MODEL_LOGITECH_K400 = (1 << 11), + EVDEV_MODEL_BOUNCING_KEYS = (1 << 11), EVDEV_MODEL_LENOVO_X220_TOUCHPAD_FW81 = (1 << 12), EVDEV_MODEL_LENOVO_CARBON_X1_6TH = (1 << 13), EVDEV_MODEL_CYBORG_RAT = (1 << 14), @@ -127,7 +127,6 @@ enum evdev_device_model { EVDEV_MODEL_APPLE_TOUCHPAD_ONEBUTTON = (1 << 25), EVDEV_MODEL_LOGITECH_MARBLE_MOUSE = (1 << 26), EVDEV_MODEL_TABLET_NO_PROXIMITY_OUT = (1 << 27), - EVDEV_MODEL_MS_NANO_TRANSCEIVER = (1 << 28), EVDEV_MODEL_TABLET_NO_TILT = (1 << 29), EVDEV_MODEL_TABLET_MODE_NO_SUSPEND = (1 << 30), EVDEV_MODEL_LENOVO_SCROLLPOINT = (1 << 31), diff --git a/udev/90-libinput-model-quirks.hwdb b/udev/90-libinput-model-quirks.hwdb index 160fca0d..e3ba8929 100644 --- a/udev/90-libinput-model-quirks.hwdb +++ b/udev/90-libinput-model-quirks.hwdb @@ -280,7 +280,13 @@ libinput:mouse:input:b0003v046DpC408* # Logitech K400 libinput:mouse:input:b0003v046Dp4024* - LIBINPUT_MODEL_LOGITECH_K400=1 +# Logitech K400r +libinput:mouse:input:b0003v046Dp404B* +# Logitech K830 +libinput:mouse:input:b0003v046Dp404C* +# Logitech K400Plus +libinput:mouse:input:b0003v046Dp404D* + LIBINPUT_MODEL_BOUNCING_KEYS=1 # Logitech Wireless Touchpad libinput:touchpad:input:b0003v046Dp4011* @@ -299,7 +305,7 @@ libinput:name:*Microsoft Surface Type Cover Keyboard*:dmi:*svnMicrosoftCorporati # Microsoft Microsoft® Nano Transceiver v2.0" libinput:mouse:input:b0003v045Ep0800* - LIBINPUT_MODEL_MS_NANO_TRANSCEIVER=1 + LIBINPUT_MODEL_BOUNCING_KEYS=1 ########################################## # Razer -- 2.34.1