debounce: disable debouncing on the Logitech K400
authorPeter Hutterer <peter.hutterer@who-t.net>
Thu, 12 Apr 2018 22:57:05 +0000 (08:57 +1000)
committerPeter Hutterer <peter.hutterer@who-t.net>
Fri, 13 Apr 2018 00:50:56 +0000 (10:50 +1000)
This is an external keyboard+touchpad but not recognised as touchpad by the
kernel so it's in mouse emulation mode. Double-taps are sent with impossibly
close timestamps and filtered out by the debouncing code. Since this isn't a
real button that can wear out anyway, let's just disable debouncing on this
device.

https://bugs.freedesktop.org/show_bug.cgi?id=105974

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
(cherry picked from commit 23614f75515ddb97089e2554a304aac3d951cff3)

src/evdev-debounce.c
src/evdev.c
src/evdev.h
udev/90-libinput-model-quirks.hwdb

index f7252dcd9ac0845aa1e75d5c1d4d8a0356d8df16..c5677e5153b15ba15510358f223e9a925f8dfd35 100644 (file)
@@ -568,7 +568,8 @@ 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) {
+       if (device->model_flags &
+           (EVDEV_MODEL_MS_NANO_TRANSCEIVER|EVDEV_MODEL_LOGITECH_K400)) {
                dispatch->debounce.state = DEBOUNCE_STATE_DISABLED;
                return;
        }
index b98dc32df20d483cc1471872554debc1b4673122..3add0dc5100f9ceba3c3ca0457c582fd79450e3e 100644 (file)
@@ -1251,6 +1251,7 @@ evdev_read_model_flags(struct evdev_device *device)
                MODEL(ALPS_TOUCHPAD),
                MODEL(SYNAPTICS_SERIAL_TOUCHPAD),
                MODEL(JUMPING_SEMI_MT),
+               MODEL(LOGITECH_K400),
                MODEL(CYBORG_RAT),
                MODEL(HP_STREAM11_TOUCHPAD),
                MODEL(LENOVO_T450_TOUCHPAD),
index 060020f9fbe6dd6713a3fba67409d0ec430c33c0..496bea7f4f7479da86bdec21b971743d0957124b 100644 (file)
@@ -110,6 +110,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_LENOVO_X220_TOUCHPAD_FW81 = (1 << 12),
        EVDEV_MODEL_CYBORG_RAT = (1 << 14),
        EVDEV_MODEL_HP_STREAM11_TOUCHPAD = (1 << 16),
index 20975aec78d829a464d015911d244b709eea6dfe..de1a2bd91d38e1278777af7dac7bf9be21453f35 100644 (file)
@@ -220,6 +220,10 @@ libinput:name:*Logitech M570*:dmi:*
 libinput:mouse:input:b0003v046DpC408*
  LIBINPUT_MODEL_LOGITECH_MARBLE_MOUSE=1
 
+# Logitech K400
+libinput:mouse:input:b0003v046Dp4024*
+ LIBINPUT_MODEL_LOGITECH_K400=1
+
 ##########################################
 # Microsoft
 ##########################################