diff options
author | Peter Hutterer <peter.hutterer@who-t.net> | 2017-02-17 08:39:51 +1000 |
---|---|---|
committer | Peter Hutterer <peter.hutterer@who-t.net> | 2017-02-20 12:25:05 +1000 |
commit | f7f849e576a5481751a8c3d086fc1b1b752fecc4 (patch) | |
tree | 16a2c61c53aa205c58fc3e8ec57c09eca428755a /src | |
parent | e43f9da9ecea6d17100c0012a89f5d162b2d7d7b (diff) |
evdev: add quirk for Logitech Marble Mouse
Device needs BTN_MIDDLE disabled, this way middle button emulation is present
by default.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/evdev.c | 5 | ||||
-rw-r--r-- | src/evdev.h | 1 |
2 files changed, 6 insertions, 0 deletions
diff --git a/src/evdev.c b/src/evdev.c index 1b7d5a8..b1d2db2 100644 --- a/src/evdev.c +++ b/src/evdev.c @@ -2261,6 +2261,7 @@ evdev_read_model_flags(struct evdev_device *device) MODEL(HP_ZBOOK_STUDIO_G3), MODEL(HP_PAVILION_DM4_TOUCHPAD), MODEL(APPLE_TOUCHPAD_ONEBUTTON), + MODEL(LOGITECH_MARBLE_MOUSE), #undef MODEL { "ID_INPUT_TRACKBALL", EVDEV_MODEL_TRACKBALL }, { NULL, EVDEV_MODEL_DEFAULT }, @@ -2858,6 +2859,10 @@ evdev_pre_configure_model_quirks(struct evdev_device *device) * https://bugs.freedesktop.org/show_bug.cgi?id=98100 */ if (device->model_flags & EVDEV_MODEL_HP_ZBOOK_STUDIO_G3) libevdev_set_abs_maximum(device->evdev, ABS_MT_SLOT, 1); + + /* 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); } struct evdev_device * diff --git a/src/evdev.h b/src/evdev.h index 967feaf..35eec84 100644 --- a/src/evdev.h +++ b/src/evdev.h @@ -126,6 +126,7 @@ enum evdev_device_model { EVDEV_MODEL_HP_ZBOOK_STUDIO_G3 = (1 << 23), EVDEV_MODEL_HP_PAVILION_DM4_TOUCHPAD = (1 << 24), EVDEV_MODEL_APPLE_TOUCHPAD_ONEBUTTON = (1 << 25), + EVDEV_MODEL_LOGITECH_MARBLE_MOUSE = (1 << 26), }; struct mt_slot { |