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>
Thu, 12 Apr 2018 23:29:36 +0000 (09:29 +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>
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 de1f989b457492964d95e3a5a5c972b6100adc62..1b47c93dd6790a5a380dc712c89179c9e595f0f8 100644 (file)
@@ -1270,6 +1270,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 20e3cd19dc6e9c53c0214135a53bb484e0933b75..18d33d4562691a7ee9294f5cd083da56ea19a69b 100644 (file)
@@ -111,6 +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_LENOVO_X220_TOUCHPAD_FW81 = (1 << 12),
        EVDEV_MODEL_CYBORG_RAT = (1 << 14),
        EVDEV_MODEL_HP_STREAM11_TOUCHPAD = (1 << 16),
index 7baec9f03c2b60bf2ecc97cb81799ae700016c16..e6b7da28034e3ef619d3cc7b73b376c897b2d663 100644 (file)
@@ -244,6 +244,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
 ##########################################