Commit 4286dcd1 authored by Peter Hutterer's avatar Peter Hutterer

quirks: switch a few model quirks over to use the new evcode disabling

Signed-off-by: Peter Hutterer's avatarPeter Hutterer <peter.hutterer@who-t.net>
parent 981f3a47
Pipeline #7046 failed with stages
in 97 minutes and 3 seconds
......@@ -4,4 +4,4 @@
MatchUdevType=tablet
MatchBus=usb
MatchVendor=0x08CA
ModelTabletNoTilt=1
AttrEventCodeDisable=ABS_TILT_X;ABS_TILT_Y;
# Kensington Orbit claims to have a middle button, same for
[Kensington Orbit Scroll Wheel]
MatchBus=usb
MatchVendor=0x047d
MatchProduct=0x2048
ModelKensingtonOrbit=1
ModelTrackball=1
AttrEventCodeDisable=BTN_MIDDLE
......@@ -4,12 +4,13 @@
MatchName=*Logitech M570*
ModelTrackball=1
# Logitech Marble Mouse claims to have a middle button
[Logitech Marble Mouse Trackball]
MatchUdevType=mouse
MatchBus=usb
MatchVendor=0x46D
MatchProduct=0xC408
ModelLogitechMarbleMouse=1
AttrEventCodeDisable=BTN_MIDDLE
[Logitech K400]
MatchUdevType=mouse
......
......@@ -19,12 +19,15 @@ ModelAppleTouchpad=1
MatchName=*Apple Inc. Apple Internal Keyboard*
AttrKeyboardIntegration=internal
# The Apple MagicMouse has a touchpad built-in but the kernel still
# emulates a full 2/3 button mouse for us. Ignore anything from the
# ABS interface
[Apple MagicMouse]
MatchUdevType=mouse
MatchBus=bluetooth
MatchVendor=0x05AC
MatchProduct=0x030D
ModelAppleMagicMouse=1
AttrEventCodeDisable=EV_ABS
[Apple Magic Trackpad v1 (2010, clickpad)]
MatchUdevType=touchpad
......
......@@ -10,7 +10,10 @@ MatchName=*ETPS/2 Elantech Touchpad*
MatchDMIModalias=dmi:*svnASUSTeKComputerInc.:pnUX21E:*
AttrPressureRange=24:10
# Asus UX302LA touchpad doesn't update the pressure values once two
# fingers are down. So let's just pretend it doesn't have pressure
# at all. https://gitlab.freedesktop.org/libinput/libinput/issues/145
[Asus UX302LA]
MatchName=*ETPS/2 Elantech Touchpad*
MatchDMIModalias=dmi:*svnASUSTeKCOMPUTERINC.:pnUX302LA:*
ModelAsusUX302LATouchpad=1
AttrEventCodeDisable=ABS_MT_PRESSURE;ABS_PRESSURE;
# Do not edit this file, it will be overwritten on update
# The Cyborg RAT has a mode button that cycles through event codes.
# On press, we get a release for the current mode and a press for the
# next mode:
# E: 0.000001 0004 0004 589833 # EV_MSC / MSC_SCAN 589833
# E: 0.000001 0001 0118 0000 # EV_KEY / (null) 0
# E: 0.000001 0004 0004 589834 # EV_MSC / MSC_SCAN 589834
# E: 0.000001 0001 0119 0001 # EV_KEY / (null) 1
# E: 0.000001 0000 0000 0000 # ------------ SYN_REPORT (0) ---------- +0ms
# E: 0.705000 0004 0004 589834 # EV_MSC / MSC_SCAN 589834
# E: 0.705000 0001 0119 0000 # EV_KEY / (null) 0
# E: 0.705000 0004 0004 589835 # EV_MSC / MSC_SCAN 589835
# E: 0.705000 0001 011a 0001 # EV_KEY / (null) 1
# E: 0.705000 0000 0000 0000 # ------------ SYN_REPORT (0) ---------- +705ms
# E: 1.496995 0004 0004 589833 # EV_MSC / MSC_SCAN 589833
# E: 1.496995 0001 0118 0001 # EV_KEY / (null) 1
# E: 1.496995 0004 0004 589835 # EV_MSC / MSC_SCAN 589835
# E: 1.496995 0001 011a 0000 # EV_KEY / (null) 0
# E: 1.496995 0000 0000 0000 # ------------ SYN_REPORT (0) ---------- +791ms
#
# https://bugs.freedesktop.org/show_bug.cgi?id=92127
#
# Disable the event codes to avoid stuck buttons.
[Saitek Cyborg RAT5]
MatchUdevType=mouse
MatchBus=usb
MatchVendor=0x06A3
MatchProduct=0x0CD5
ModelCyborgRat=1
# EV_KEY 0x118, 0x119, 0x11a
AttrEventCodeDisable=EV_KEY:0x118;EV_KEY:0x119;EV_KEY:0x11a
# Do not edit this file, it will be overwritten on update
#
# Claims to have double/tripletap but doesn't actually send it
# https://bugs.freedesktop.org/show_bug.cgi?id=98538
[HP Compaq 6910p]
MatchName=*SynPS/2 Synaptics TouchPad
MatchDMIModalias=dmi:*svnHewlett-Packard:*pnHPCompaq6910p*
ModelHP6910Touchpad=1
AttrEventCodeDisable=BTN_TOOL_DOUBLETAP;BTN_TOOL_TRIPLETAP;
# Claims to have double/tripletap but doesn't actually send it
# https://bugzilla.redhat.com/show_bug.cgi?id=1351285 and
[HP Compaq 8510w]
MatchName=*SynPS/2 Synaptics TouchPad
MatchDMIModalias=dmi:*svnHewlett-Packard:*pnHPCompaq8510w*
ModelHP8510Touchpad=1
AttrEventCodeDisable=BTN_TOOL_DOUBLETAP;BTN_TOOL_TRIPLETAP;
[HP Pavillion dmi4]
MatchName=*SynPS/2 Synaptics TouchPad
......
......@@ -70,11 +70,12 @@ MatchName=AT Translated Set 2 keyboard
MatchDMIModalias=dmi:*svnLENOVO:*pvrThinkPad*Yoga*:*
ModelTabletModeNoSuspend=1
# Lenovo Carbon X1 6th gen (RMI4 only, PS/2 is broken on this device)
# Lenovo Carbon X1 6th gen (RMI4 only, PS/2 is broken on this device,
# sends bogus ABS_MT_TOOL_TYPE events for MT_TOOL_PALM
[Lenovo Carbon X1 6th gen]
MatchName=Synaptics TM3288-011
MatchDMIModalias=dmi:*svnLenovo:*pvrThinkPadX1Carbon6th:*
ModelLenovoCarbonX16th=1
AttrEventCodeDisable=ABS_MT_TOOL_TYPE
[Lenovo X41 Tablet]
MatchName=AT Translated Set 2 keyboard
......
......@@ -1902,51 +1902,6 @@ evdev_pre_configure_model_quirks(struct evdev_device *device)
const struct quirk_tuples *t;
char *prop;
/* The Cyborg RAT has a mode button that cycles through event codes.
* On press, we get a release for the current mode and a press for the
* next mode:
* E: 0.000001 0004 0004 589833 # EV_MSC / MSC_SCAN 589833
* E: 0.000001 0001 0118 0000 # EV_KEY / (null) 0
* E: 0.000001 0004 0004 589834 # EV_MSC / MSC_SCAN 589834
* E: 0.000001 0001 0119 0001 # EV_KEY / (null) 1
* E: 0.000001 0000 0000 0000 # ------------ SYN_REPORT (0) ---------- +0ms
* E: 0.705000 0004 0004 589834 # EV_MSC / MSC_SCAN 589834
* E: 0.705000 0001 0119 0000 # EV_KEY / (null) 0
* E: 0.705000 0004 0004 589835 # EV_MSC / MSC_SCAN 589835
* E: 0.705000 0001 011a 0001 # EV_KEY / (null) 1
* E: 0.705000 0000 0000 0000 # ------------ SYN_REPORT (0) ---------- +705ms
* E: 1.496995 0004 0004 589833 # EV_MSC / MSC_SCAN 589833
* E: 1.496995 0001 0118 0001 # EV_KEY / (null) 1
* E: 1.496995 0004 0004 589835 # EV_MSC / MSC_SCAN 589835
* E: 1.496995 0001 011a 0000 # EV_KEY / (null) 0
* E: 1.496995 0000 0000 0000 # ------------ SYN_REPORT (0) ---------- +791ms
*
* https://bugs.freedesktop.org/show_bug.cgi?id=92127
*
* Disable the event codes to avoid stuck buttons.
*/
if (evdev_device_has_model_quirk(device, QUIRK_MODEL_CYBORG_RAT)) {
libevdev_disable_event_code(device->evdev, EV_KEY, 0x118);
libevdev_disable_event_code(device->evdev, EV_KEY, 0x119);
libevdev_disable_event_code(device->evdev, EV_KEY, 0x11a);
}
/* The Apple MagicMouse has a touchpad built-in but the kernel still
* emulates a full 2/3 button mouse for us. Ignore anything from the
* ABS interface
*/
if (evdev_device_has_model_quirk(device, QUIRK_MODEL_APPLE_MAGICMOUSE))
libevdev_disable_event_type(device->evdev, EV_ABS);
/* Claims to have double/tripletap but doesn't actually send it
* https://bugzilla.redhat.com/show_bug.cgi?id=1351285 and
* https://bugs.freedesktop.org/show_bug.cgi?id=98538
*/
if (evdev_device_has_model_quirk(device, QUIRK_MODEL_HP8510_TOUCHPAD) ||
evdev_device_has_model_quirk(device, QUIRK_MODEL_HP6910_TOUCHPAD)) {
libevdev_disable_event_code(device->evdev, EV_KEY, BTN_TOOL_DOUBLETAP);
libevdev_disable_event_code(device->evdev, EV_KEY, BTN_TOOL_TRIPLETAP);
}
/* Touchpad is a clickpad but INPUT_PROP_BUTTONPAD is not set, see
* fdo bug 97147. Remove when RMI4 is commonplace */
if (evdev_device_has_model_quirk(device, QUIRK_MODEL_HP_STREAM11_TOUCHPAD))
......@@ -1958,41 +1913,6 @@ evdev_pre_configure_model_quirks(struct evdev_device *device)
if (evdev_device_has_model_quirk(device, QUIRK_MODEL_HP_ZBOOK_STUDIO_G3))
libevdev_set_abs_maximum(device->evdev, ABS_MT_SLOT, 1);
/* Logitech Marble Mouse claims to have a middle button, same for
* the Kensington Orbit */
if (evdev_device_has_model_quirk(device,
QUIRK_MODEL_LOGITECH_MARBLE_MOUSE) ||
evdev_device_has_model_quirk(device,
QUIRK_MODEL_KENSINGTON_ORBIT))
libevdev_disable_event_code(device->evdev, EV_KEY, BTN_MIDDLE);
/* Aiptek tablets have tilt but don't send events */
if (evdev_device_has_model_quirk(device, QUIRK_MODEL_TABLET_NO_TILT)) {
libevdev_disable_event_code(device->evdev, EV_ABS, ABS_TILT_X);
libevdev_disable_event_code(device->evdev, EV_ABS, ABS_TILT_Y);
}
/* Lenovo Carbon X1 6th gen sends bogus ABS_MT_TOOL_TYPE events for
* MT_TOOL_PALM */
if (evdev_device_has_model_quirk(device, QUIRK_MODEL_LENOVO_CARBON_X1_6TH))
libevdev_disable_event_code(device->evdev,
EV_ABS,
ABS_MT_TOOL_TYPE);
/* Asus UX302LA touchpad doesn't update the pressure values once two
* fingers are down. So let's just pretend it doesn't have pressure
* at all. https://gitlab.freedesktop.org/libinput/libinput/issues/145
*/
if (evdev_device_has_model_quirk(device,
QUIRK_MODEL_ASUS_UX320LA_TOUCHPAD)) {
libevdev_disable_event_code(device->evdev,
EV_ABS,
ABS_MT_PRESSURE);
libevdev_disable_event_code(device->evdev,
EV_ABS,
ABS_PRESSURE);
}
/* Generally we don't care about MSC_TIMESTAMP and it can cause
* unnecessary wakeups but on some devices we need to watch it for
* pointer jumps */
......@@ -2018,6 +1938,12 @@ evdev_pre_configure_model_quirks(struct evdev_device *device)
libevdev_disable_event_code(device->evdev,
type,
code);
evdev_log_debug(device,
"quirks: disabling %s %s (%#x %#x)\n",
libevdev_event_type_get_name(type),
libevdev_event_code_get_name(type, code),
type,
code);
}
}
......
......@@ -231,25 +231,17 @@ quirk_get_name(enum quirk q)
{
switch(q) {
case QUIRK_MODEL_ALPS_TOUCHPAD: return "ModelALPSTouchpad";
case QUIRK_MODEL_APPLE_MAGICMOUSE: return "ModelAppleMagicMouse";
case QUIRK_MODEL_APPLE_TOUCHPAD: return "ModelAppleTouchpad";
case QUIRK_MODEL_APPLE_TOUCHPAD_ONEBUTTON: return "ModelAppleTouchpadOneButton";
case QUIRK_MODEL_ASUS_UX320LA_TOUCHPAD: return "ModelAsusUX302LATouchpad";
case QUIRK_MODEL_BOUNCING_KEYS: return "ModelBouncingKeys";
case QUIRK_MODEL_CHROMEBOOK: return "ModelChromebook";
case QUIRK_MODEL_CLEVO_W740SU: return "ModelClevoW740SU";
case QUIRK_MODEL_CYBORG_RAT: return "ModelCyborgRat";
case QUIRK_MODEL_HP6910_TOUCHPAD: return "ModelHP6910Touchpad";
case QUIRK_MODEL_HP8510_TOUCHPAD: return "ModelHP8510Touchpad";
case QUIRK_MODEL_HP_PAVILION_DM4_TOUCHPAD: return "ModelHPPavilionDM4Touchpad";
case QUIRK_MODEL_HP_STREAM11_TOUCHPAD: return "ModelHPStream11Touchpad";
case QUIRK_MODEL_HP_ZBOOK_STUDIO_G3: return "ModelHPZBookStudioG3";
case QUIRK_MODEL_KENSINGTON_ORBIT: return "ModelKensingtonOrbit";
case QUIRK_MODEL_LENOVO_CARBON_X1_6TH: return "ModelLenovoCarbonX16th";
case QUIRK_MODEL_LENOVO_SCROLLPOINT: return "ModelLenovoScrollPoint";
case QUIRK_MODEL_LENOVO_T450_TOUCHPAD: return "ModelLenovoT450Touchpad";
case QUIRK_MODEL_LENOVO_X230: return "ModelLenovoX230";
case QUIRK_MODEL_LOGITECH_MARBLE_MOUSE: return "ModelLogitechMarbleMouse";
case QUIRK_MODEL_SYNAPTICS_SERIAL_TOUCHPAD: return "ModelSynapticsSerialTouchpad";
case QUIRK_MODEL_SYSTEM76_BONOBO: return "ModelSystem76Bonobo";
case QUIRK_MODEL_SYSTEM76_GALAGO: return "ModelSystem76Galago";
......
......@@ -63,25 +63,17 @@ struct quirk_tuples {
*/
enum quirk {
QUIRK_MODEL_ALPS_TOUCHPAD = 100,
QUIRK_MODEL_APPLE_MAGICMOUSE,
QUIRK_MODEL_APPLE_TOUCHPAD,
QUIRK_MODEL_APPLE_TOUCHPAD_ONEBUTTON,
QUIRK_MODEL_ASUS_UX320LA_TOUCHPAD,
QUIRK_MODEL_BOUNCING_KEYS,
QUIRK_MODEL_CHROMEBOOK,
QUIRK_MODEL_CLEVO_W740SU,
QUIRK_MODEL_CYBORG_RAT,
QUIRK_MODEL_HP6910_TOUCHPAD,
QUIRK_MODEL_HP8510_TOUCHPAD,
QUIRK_MODEL_HP_PAVILION_DM4_TOUCHPAD,
QUIRK_MODEL_HP_STREAM11_TOUCHPAD,
QUIRK_MODEL_HP_ZBOOK_STUDIO_G3,
QUIRK_MODEL_KENSINGTON_ORBIT,
QUIRK_MODEL_LENOVO_CARBON_X1_6TH,
QUIRK_MODEL_LENOVO_SCROLLPOINT,
QUIRK_MODEL_LENOVO_T450_TOUCHPAD,
QUIRK_MODEL_LENOVO_X230,
QUIRK_MODEL_LOGITECH_MARBLE_MOUSE,
QUIRK_MODEL_SYNAPTICS_SERIAL_TOUCHPAD,
QUIRK_MODEL_SYSTEM76_BONOBO,
QUIRK_MODEL_SYSTEM76_GALAGO,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment