summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--quirks/50-system-lenovo.quirks14
-rw-r--r--src/evdev-fallback.c9
-rw-r--r--src/quirks.c1
-rw-r--r--src/quirks.h1
4 files changed, 24 insertions, 1 deletions
diff --git a/quirks/50-system-lenovo.quirks b/quirks/50-system-lenovo.quirks
index 03632be9..ffd5107f 100644
--- a/quirks/50-system-lenovo.quirks
+++ b/quirks/50-system-lenovo.quirks
@@ -218,7 +218,7 @@ MatchDMIModalias=dmi:*svnLENOVO:*pvrThinkPadX1Tablet:*
ModelTabletModeNoSuspend=1
# Misidentified as an external keyboard by libinput
-# Tested on Legion 5 15AR05H
+# Tested on Legion 5 15AR05H
[Lenovo Legion 5 Keyboard]
MatchUdevType=keyboard
MatchBus=usb
@@ -255,3 +255,15 @@ MatchName=AT Raw Set 2 keyboard
MatchDMIModalias=dmi:*svnLENOVO:*pvrYogaDuet713IML05:*
ModelTabletModeNoSuspend=1
+# https://gitlab.freedesktop.org/libinput/libinput/-/issues/651
+[Lenovo TrackPoint Keyboard II USB]
+MatchBus=usb
+MatchVendor=0x17EF
+MatchProduct=0x60EE
+ModelLenovoTrackpointKeyboard2=1
+
+[Lenovo TrackPoint Keyboard II Bluetooth]
+MatchBus=bluetooth
+MatchVendor=0x17EF
+MatchProduct=0x60E1
+ModelLenovoTrackpointKeyboard2=1
diff --git a/src/evdev-fallback.c b/src/evdev-fallback.c
index b702a1d1..f7c7e02b 100644
--- a/src/evdev-fallback.c
+++ b/src/evdev-fallback.c
@@ -71,6 +71,15 @@ fallback_notify_physical_button(struct fallback_dispatch *dispatch,
if (button == BTN_MIDDLE)
dispatch->wheel.is_inhibited = (state == LIBINPUT_BUTTON_STATE_PRESSED);
+ /* Lenovo TrackPoint Keyboard II sends its own scroll events when its
+ * trackpoint is moved while the middle button is pressed.
+ * Do not inhibit the scroll events.
+ * https://gitlab.freedesktop.org/libinput/libinput/-/issues/651
+ */
+ if (evdev_device_has_model_quirk(device,
+ QUIRK_MODEL_LENOVO_TRACKPOINT_KEYBOARD_2))
+ dispatch->wheel.is_inhibited = false;
+
evdev_pointer_notify_physical_button(device, time, button, state);
}
diff --git a/src/quirks.c b/src/quirks.c
index b556a9ab..502c8bd0 100644
--- a/src/quirks.c
+++ b/src/quirks.c
@@ -254,6 +254,7 @@ quirk_get_name(enum quirk q)
case QUIRK_MODEL_INVERT_HORIZONTAL_SCROLLING: return "ModelInvertHorizontalScrolling";
case QUIRK_MODEL_LENOVO_SCROLLPOINT: return "ModelLenovoScrollPoint";
case QUIRK_MODEL_LENOVO_T450_TOUCHPAD: return "ModelLenovoT450Touchpad";
+ case QUIRK_MODEL_LENOVO_TRACKPOINT_KEYBOARD_2: return "ModelLenovoTrackpointKeyboard2";
case QUIRK_MODEL_LENOVO_X1GEN6_TOUCHPAD: return "ModelLenovoX1Gen6Touchpad";
case QUIRK_MODEL_LENOVO_X230: return "ModelLenovoX230";
case QUIRK_MODEL_SYNAPTICS_SERIAL_TOUCHPAD: return "ModelSynapticsSerialTouchpad";
diff --git a/src/quirks.h b/src/quirks.h
index 4a970b90..47131188 100644
--- a/src/quirks.h
+++ b/src/quirks.h
@@ -74,6 +74,7 @@ enum quirk {
QUIRK_MODEL_INVERT_HORIZONTAL_SCROLLING,
QUIRK_MODEL_LENOVO_SCROLLPOINT,
QUIRK_MODEL_LENOVO_T450_TOUCHPAD,
+ QUIRK_MODEL_LENOVO_TRACKPOINT_KEYBOARD_2,
QUIRK_MODEL_LENOVO_X1GEN6_TOUCHPAD,
QUIRK_MODEL_LENOVO_X230,
QUIRK_MODEL_SYNAPTICS_SERIAL_TOUCHPAD,