quirks: Lenovo Trackpoint Keyboard II

The device sends its own scroll events when its trackpoint is moved
while the middle button is pressed.

Because scroll events are inhibited while the middle button is pressed
a quirk is necessary for this device to not inhibit scroll events.

Signed-off-by: José Expósito <jose.exposito89@gmail.com>
This commit is contained in:
José Expósito 2021-08-24 18:01:59 +02:00
parent ca1c05ab44
commit 53bd70f4c7
4 changed files with 24 additions and 1 deletions

View file

@ -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

View file

@ -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);
}

View file

@ -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";

View file

@ -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,