From 69950b54423c05cbd6d97b17709a848dd0b2387a Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Mon, 18 Dec 2017 15:11:39 +1000 Subject: [PATCH libinput] Add a model quirk for the iOne Lynx R71 Nano Because apparently it's fun to send an extra button event after every button click. Note that this requires a kernel patch, otherwise the magic 271 button is mapped to BTN_FORWARD: https://patchwork.kernel.org/patch/10102635/ Signed-off-by: Peter Hutterer --- src/evdev.c | 4 ++++ src/evdev.h | 1 + udev/90-libinput-model-quirks.hwdb | 7 +++++++ 3 files changed, 12 insertions(+) diff --git a/src/evdev.c b/src/evdev.c index 28b7b44d..2f3c6a82 100644 --- a/src/evdev.c +++ b/src/evdev.c @@ -1860,6 +1860,10 @@ evdev_pre_configure_model_quirks(struct evdev_device *device) /* Logitech Marble Mouse claims to have a middle button */ if (device->model_flags & EVDEV_MODEL_LOGITECH_MARBLE_MOUSE) libevdev_disable_event_code(device->evdev, EV_KEY, BTN_MIDDLE); + + /* Sends a 271 button after every button press #103244 */ + if (device->model_flags & EVDEV_MODEL_IONE_LYNX_NANO) + libevdev_disable_event_code(device->evdev, 271); } static void diff --git a/src/evdev.h b/src/evdev.h index 75223852..6e0624dd 100644 --- a/src/evdev.h +++ b/src/evdev.h @@ -124,6 +124,7 @@ 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_IONE_LYNX_NANO = (1 << 28), }; enum evdev_button_scroll_state { diff --git a/udev/90-libinput-model-quirks.hwdb b/udev/90-libinput-model-quirks.hwdb index c23ef833..c5373287 100644 --- a/udev/90-libinput-model-quirks.hwdb +++ b/udev/90-libinput-model-quirks.hwdb @@ -177,6 +177,13 @@ libinput:tablet:input:b0003v256Cp* LIBINPUT_MODEL_TABLET_NO_PROXIMITY_OUT=1 ########################################## +# iOne +########################################## +# iONE Lynx-R17Nano +libinput:mouse:input:b0003v04B4p06B0* + LIBINPUT_MODEL_IONE_LYNX_NANO=1 + +########################################## # LENOVO ########################################## -- 2.13.6