# Do not edit this file, it will be overwritten on update

[Lenovo Thinkpad Touchpad]
MatchName=*Synaptics*
MatchDMIModalias=dmi:*svnLENOVO:*:pvrThinkPad*:*
AttrThumbPressureThreshold=100

[Lenovo x230 Touchpad]
MatchName=*SynPS/2 Synaptics TouchPad
MatchDMIModalias=dmi:*svnLENOVO:*:pvrThinkPadX230*
ModelLenovoX230=1

[Lenovo T440p Touchpad PS/2]
MatchName=SynPS/2 Synaptics TouchPad
MatchDMIModalias=dmi:*svnLENOVO:*:pvrThinkPadT440p*
ModelLenovoT450Touchpad=1

[Lenovo T440p Touchpad RMI4]
MatchName=Synaptics tm2964-001
MatchDMIModalias=dmi:*svnLENOVO:*:pvrThinkPadT440p*
ModelLenovoT450Touchpad=1

[Lenovo T470 Trackpoint]
MatchName=*TPPS/2 IBM TrackPoint
MatchDMIModalias=dmi:*svnLENOVO:*:pvrThinkPadT470:*
AttrTrackpointMultiplier=0.75

[Lenovo T480 Trackpoint]
MatchName=*TPPS/2 IBM TrackPoint
MatchDMIModalias=dmi:*svnLENOVO:*:pvrThinkPadT480:*
AttrTrackpointMultiplier=0.75

[Lenovo A485 Trackpoint]
MatchName=*TPPS/2 IBM TrackPoint
MatchDMIModalias=dmi:*svnLENOVO:*:pvrThinkPadA485:*
AttrTrackpointMultiplier=0.75

# Touchpad is a clickpad but INPUT_PROP_BUTTONPAD is not set, see
# https://gitlab.freedesktop.org/libinput/libinput/issues/177
[Lenovo T480s Touchpad]
MatchName=Elan Touchpad
MatchDMIModalias=dmi:*svnLENOVO:*:pvrThinkPadT480s*
AttrInputProp=+INPUT_PROP_BUTTONPAD

# Touchpad is a clickpad but INPUT_PROP_BUTTONPAD is not set, see
# https://gitlab.freedesktop.org/libinput/libinput/issues/177
[Lenovo T490s Touchpad]
MatchName=Elan Touchpad
MatchDMIModalias=dmi:*svnLENOVO:*:pvrThinkPadT490s*
AttrInputProp=+INPUT_PROP_BUTTONPAD

[Lenovo T490s Trackpoint]
MatchName=*TPPS/2 IBM TrackPoint
MatchDMIModalias=dmi:*svnLENOVO:*:pvrThinkPadT490s:*
AttrTrackpointMultiplier=0.4

[Lenovo P14s Gen 1 AMD Trackpoint]
MatchUdevType=pointingstick
MatchName=*TPPS/2 Elan TrackPoint*
MatchDMIModalias=dmi:*svnLENOVO:*:pvrThinkPadP14sGen1*
AttrTrackpointMultiplier=0.4

# Touchpad is a clickpad but INPUT_PROP_BUTTONPAD is not set, see
# https://gitlab.freedesktop.org/libinput/libinput/issues/234
[Lenovo L380 Touchpad]
MatchName=Elan Touchpad
MatchDMIModalias=dmi:*svnLENOVO:*:pvrThinkPadL380*
AttrInputProp=+INPUT_PROP_BUTTONPAD

[Lenovo X200/201 Trackpoint]
MatchName=*TPPS/2 IBM TrackPoint
MatchDMIModalias=dmi:*svnLENOVO:*pvrThinkPadX20?:*
AttrTrackpointMultiplier=0.25

[Lenovo X200s/201s Trackpoint]
MatchName=*TPPS/2 IBM TrackPoint
MatchDMIModalias=dmi:*svnLENOVO:*pvrThinkPadX20??:*
AttrTrackpointMultiplier=0.25

[Lenovo X230 Trackpoint]
MatchName=*TPPS/2 IBM TrackPoint
MatchDMIModalias=dmi:*svnLENOVO:*pvrThinkPadX230:*
AttrTrackpointMultiplier=0.25

[Lenovo X280 Trackpoint]
MatchName=*TPPS/2 Elan TrackPoint
MatchDMIModalias=dmi:*svnLENOVO:*pvrThinkPadX280:*
AttrTrackpointMultiplier=0.5

[Lenovo X280 Touchpad]
MatchName=Synaptics TM3381-002
MatchDMIModalias=dmi:*svnLENOVO:*:pvrThinkPadX280*
AttrPalmSizeThreshold=6

[Lenovo P50 Touchpad]
MatchName=SynPS/2 Synaptics TouchPad
MatchDMIModalias=dmi:*svnLENOVO:*:pvrThinkPadP50*:
ModelLenovoT450Touchpad=1
AttrPalmPressureThreshold=150

[Lenovo *50 Touchpad]
MatchName=SynPS/2 Synaptics TouchPad
MatchDMIModalias=dmi:*svnLENOVO:*:pvrThinkPad??50*:
ModelLenovoT450Touchpad=1
AttrPalmPressureThreshold=150

[Lenovo *60 Touchpad]
MatchName=SynPS/2 Synaptics TouchPad
MatchDMIModalias=dmi:*svnLENOVO:*:pvrThinkPad??60*:
ModelLenovoT450Touchpad=1
AttrPalmPressureThreshold=150

[Lenovo X1 Carbon 3rd Touchpad]
MatchName=SynPS/2 Synaptics TouchPad
MatchDMIModalias=dmi:*svnLENOVO:*:pvrThinkPadX1Carbon3rd:*
ModelLenovoT450Touchpad=1
AttrPalmPressureThreshold=150

[Lenovo X1 Carbon 4th Trackpoint]
MatchUdevType=pointingstick
MatchName=*TPPS/2 IBM TrackPoint*
MatchDMIModalias=dmi:*svnLENOVO:*:pvrThinkPadX1Carbon4th*
AttrTrackpointMultiplier=0.5

[Lenovo X1 Carbon 6th Trackpoint]
MatchUdevType=pointingstick
MatchName=*TPPS/2 Elan TrackPoint*
MatchDMIModalias=dmi:*svnLENOVO:*:pvrThinkPadX1Carbon6th*
AttrTrackpointMultiplier=0.4

[Lenovo ThinkPad Compact USB Keyboard with TrackPoint (keyboard)]
MatchUdevType=keyboard
MatchBus=usb
MatchVendor=0x17EF
MatchProduct=0x6047
AttrKeyboardIntegration=external

[Lenovo ThinkPad Compact USB Keyboard with TrackPoint (trackpoint)]
MatchUdevType=pointingstick
MatchBus=usb
MatchVendor=0x17EF
MatchProduct=0x6047
AttrPointingStickIntegration=external

# Lenovo Thinkpad Yoga (not the consumer versions) disables the keyboard
# mechanically. We must not disable the keyboard because some keys are
# still accessible on the screen and volume rocker.
# Initially #103749 and extended by #106799 comment 7
[Lenovo Thinkpad Yoga]
MatchName=AT Translated Set 2 keyboard
MatchDMIModalias=dmi:*svnLENOVO:*pvrThinkPad*Yoga*:*
ModelTabletModeNoSuspend=1

[Lenovo X1 Yoga Trackpoint 1st gen]
MatchName=*TPPS/2 IBM TrackPoint
MatchDMIModalias=dmi:*svnLENOVO:*:pvrThinkPadX1Yoga1st:*
AttrTrackpointMultiplier=1.25

# A true pressurepad so let's not use pressure for contact size
# https://gitlab.freedesktop.org/libinput/libinput/-/issues/562
[Lenovo Yoga 9i Pressurepad]
MatchBus=i2c
MatchVendor=0x06CB
MatchProduct=0xCE37
ModelPressurePad=1

[Lenovo Yoga C930 Tablet]
MatchBus=i2c
MatchVendor=0x056A
MatchProduct=0x5196
AttrTabletSmoothing=1

# 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:*
AttrEventCode=-ABS_MT_TOOL_TYPE
ModelLenovoX1Gen6Touchpad=1

[Lenovo X41 Tablet]
MatchName=AT Translated Set 2 keyboard
MatchDMIModalias=dmi:*svnIBM:*pvrThinkPadX41Tablet:*
ModelTabletModeNoSuspend=1

[Lenovo X60 Tablet]
MatchName=AT Translated Set 2 keyboard
MatchDMIModalias=dmi:*svnLENOVO:*pvrThinkPadX60Tablet:*
ModelTabletModeNoSuspend=1

[Lenovo X61 Tablet]
MatchName=AT Translated Set 2 keyboard
MatchDMIModalias=dmi:*svnLENOVO:*pvrThinkPadX61Tablet:*
ModelTabletModeNoSuspend=1

# Lenovo X220 Tablet special bezel buttons are associated to the
# keyboard and would therefore mistakenly be deactivated as well.
# See https://gitlab.freedesktop.org/libinput/libinput/issues/154
[Lenovo X220 Tablet]
MatchName=AT Translated Set 2 keyboard
MatchDMIModalias=dmi:*svnLENOVO:*pvrThinkPadX220Tablet:*
ModelTabletModeNoSuspend=1

# Special bezel button deactivation with
# keyboard also applies to X230 Tablet
[Lenovo X230 Tablet]
MatchName=AT Translated Set 2 keyboard
MatchDMIModalias=dmi:*svnLENOVO:*pvrThinkPadX230Tablet:*
ModelTabletModeNoSuspend=1

# Special bezel button deactivation with
# keyboard also applies to X200 Tablet
[Lenovo X200 Tablet]
MatchName=AT Translated Set 2 keyboard
MatchDMIModalias=dmi:*svnLENOVO:*pvrThinkPadX200Tablet:*
ModelTabletModeNoSuspend=1

[Lenovo X201 Tablet]
MatchName=AT Translated Set 2 keyboard
MatchDMIModalias=dmi:*svnLENOVO:*pvrThinkPadX201Tablet:*
ModelTabletModeNoSuspend=1

# Lenovo MIIX 720 comes with a detachable keyboard. We must not disable
# the keyboard because some keys are still accessible on the screen and
# volume rocker. See
# https://gitlab.freedesktop.org/libinput/libinput/issues/115
[Lenovo MIIX 720]
MatchName=AT Raw Set 2 keyboard
MatchDMIModalias=dmi:*svnLENOVO:*pvrLenovoMIIX720-12IKB:*
ModelTabletModeNoSuspend=1

# Lenovo ThinkPad X1 Tablet (1st Gen) also comes with a detachable keyboard.
# We must not disable the keyboard because some keys are still accessible on
# volume rocker.
[Lenovo ThinkPad X1 Tablet (1st Gen)]
MatchName=AT Raw Set 2 keyboard
MatchDMIModalias=dmi:*svnLENOVO:*pvrThinkPadX1Tablet:*
ModelTabletModeNoSuspend=1

# Misidentified as an external keyboard by libinput
# Tested on Legion 5 15AR05H
[Lenovo Legion 5 Keyboard (C100)]
MatchUdevType=keyboard
MatchBus=usb
MatchVendor=0x048D
MatchProduct=0xC100
AttrKeyboardIntegration=internal

# Tested on Legion 5 15ARH7H, should also work for Legion 5 Pro 16ARH7H
# 048d:c102 Integrated Technology Express, Inc. ITE Device(8910)
[Lenovo Legion 5 Keyboard (C102)]
MatchUdevType=keyboard
MatchBus=usb
MatchVendor=0x048D
MatchProduct=0xC102
AttrKeyboardIntegration=internal

# Tested on Legion Pro 5 16IRX8
# 048d:c103 Integrated Technology Express, Inc. ITE Device(8910)
[Lenovo Legion 5 Keyboard (C103)]
MatchUdevType=keyboard
MatchBus=usb
MatchVendor=0x048D
MatchProduct=0xC103
AttrKeyboardIntegration=internal

[Lenovo Legion 5 Keyboard (C955)]
MatchUdevType=keyboard
MatchBus=usb
MatchVendor=0x048D
MatchProduct=0xC955
AttrKeyboardIntegration=internal

# Tested on Lenovo Legion 5 Pro 16ACH6H
[Lenovo Legion 5 Pro Keyboard]
MatchUdevType=keyboard
MatchBus=usb
MatchVendor=0x048D
MatchProduct=0xC101
AttrKeyboardIntegration=internal

[Lenovo Legion 5i Keyboard]
MatchName=ITE Tech. Inc. ITE Device(8910) Keyboard
MatchDMIModalias=dmi:*svnLENOVO:*pvrLegion515IAH7H:*
AttrKeyboardIntegration=internal

[Lenovo Legion 7 Keyboard]
MatchUdevType=keyboard
MatchBus=usb
MatchVendor=0x048D
MatchProduct=0xC968
AttrKeyboardIntegration=internal

[Lenovo Legion Y740 Keyboard]
MatchUdevType=keyboard
MatchBus=usb
MatchVendor=0x048D
MatchProduct=0xC936
AttrKeyboardIntegration=internal

[Lenovo Legion Slim 7]
MatchUdevType=keyboard
MatchBus=usb
MatchVendor=0x048D
MatchProduct=0xC967
AttrKeyboardIntegration=internal

[Lenovo Legion Slim 7 Gen 8]
MatchUdevType=keyboard
MatchBus=usb
MatchVendor=0x048D
MatchProduct=0xC987
AttrKeyboardIntegration=internal

# https://gitlab.freedesktop.org/libinput/libinput/-/issues/604
[Lenovo Yoga Slim 9 14ITL5 Pressurepad]
MatchBus=i2c
MatchVendor=0x27C6
MatchProduct=0x01E8
ModelPressurePad=1

# Duet 7i tablet switch activated by folding keyboard cover, or removing it.
# We must not disable volume rocker 'keyboard'.
[Lenovo Duet 7i]
MatchName=AT Raw Set 2 keyboard
MatchDMIModalias=dmi:*svnLENOVO:*pvrYogaDuet713IML05:*
ModelTabletModeNoSuspend=1

# Lenovo IdeaPad Duet 3 also comes with a detachable keyboard.
[Lenovo IdeaPad Duet 3]
MatchName=AT Raw Set 2 keyboard
MatchDMIModalias=dmi:*svnLENOVO:*pvrIdeaPadDuet3*:*
ModelTabletModeNoSuspend=1

# Modifies pressure range to avoid random jumps.
# https://gitlab.freedesktop.org/libinput/libinput/-/issues/407
[Lenovo Yoga 2 Pro touchpad]
MatchUdevType=touchpad
MatchName=*SynPS/2 Synaptics TouchPad
MatchDMIModalias=dmi:*svnLENOVO:*:pvrLenovoYoga2Pro*
AttrPressureRange=50:45

[Lenovo Legion 7i 4090 Keyboard]
MatchUdevType=keyboard
MatchBus=usb
MatchDMIModalias=dmi:*svnLENOVO:*:pvrLegionY9000PIRX8H*
AttrKeyboardIntegration=internal

[Lenovo LOQ 15IRH8 Keyboard]
MatchUdevType=keyboard
MatchBus=usb
MatchVendor=0x048D
MatchProduct=0xC986
AttrKeyboardIntegration=internal

[Lenovo ThinkPad E14 v2]
MatchUdevType=touchpad
MatchName=*Elan Touchpad
MatchDMIModalias=dmi:*svnLENOVO:*:pvrThinkPadE14Gen2*
AttrPalmPressureThreshold=300
AttrPressureRange=10:8

[Lenovo ThinkPad E16 Gen 3]
MatchUdevType=pointingstick
MatchName=*TPPS/2 Elan TrackPoint*
MatchDMIModalias=dmi:*svnLENOVO:*:pvrThinkPadE16Gen3*
AttrTrackpointMultiplier=0.5

# White Backlit Keyboard
[Lenovo Ideapad Gaming 3]
MatchUdevType=keyboard
MatchBus=usb
MatchVendor=0x048D
MatchProduct=0xC966
AttrKeyboardIntegration=internal

[Lenovo Thinkpad Yoga X390]
MatchUdevType=pointingstick
MatchName=*TPPS/2 Elan TrackPoint*
MatchDMIModalias=dmi:*svnLENOVO:*pvrThinkPadX390Yoga*:*
AttrTrackpointMultiplier=0.4

# This should cover all keyboards that are misidentified as external.
# Tested on Lenovo Legion 5 Pro (2023)
[Lenovo 16ARX8 keyboard]
MatchName=ITE Tech. Inc. ITE Device(8910) Keyboard
MatchUdevType=keyboard
MatchDMIModalias=dmi:*svnLENOVO:*
AttrKeyboardIntegration=internal

# Some ThinkBook 14/16 G7+ ASP models come with pressure pads that were not
# correctly declared as such.
[Lenovo ThinkBook G7+ ASP touchpad]
MatchName=*GXTP5100*
MatchDMIModalias=dmi:*svnLENOVO:*pvrThinkBook*G7+ASP*:*
MatchUdevType=touchpad
ModelPressurePad=1

# The ThinkBook 14/16 G6+ IMH also has a similar issue as the G7+ mentioned above.
[Lenovo ThinkBook G6+ IMH]
MatchName=*GXTP5100*
MatchDMIModalias=dmi:*svnLENOVO:*pvrThinkBook*G6+IMH*:*
MatchUdevType=touchpad
ModelPressurePad=1

# Lenovo Yoga Slim 7i Carbon sends bogus ABS_MT_TOOL_TYPE MT_TOOL_PALM events
[Lenovo Yoga Slim 7i Carbon]
MatchName=* Touchpad
MatchDMIModalias=dmi:*:svnLENOVO:*pvrYogaSlim7Carbon13IAP7:*
AttrEventCode=-ABS_MT_TOOL_TYPE

# The ThinkPad X9 15 Gen 1 Forcepad touchpad is not
# detected as a pressure pad
[Lenovo ThinkPad X9 15 Gen 1]
MatchName=*GXTP5100*
MatchDMIModalias=dmi:*svnLENOVO:*pvrThinkPadX9-15Gen1*:*
MatchUdevType=touchpad
ModelPressurePad=1

# The ThinkBook 14/16 G7+ IAH also has a similar issue as the ASP mentioned above.
[Lenovo ThinkBook G7+ IAH touchpad]
MatchName=*GXTP5100*
MatchDMIModalias=dmi:*svnLENOVO:*pvrThinkBook*G7+IAH*:*
MatchUdevType=touchpad
ModelPressurePad=1

# "GXTP5420 Touchpad": pressure touchpad mostly used in Lenovo laptops.
# GXTP5420:00 27C6:0F95 Touchpad
[Goodix Haptic Touchpad (27C6:0F95)]
MatchBus=i2c
MatchVendor=0x27C6
MatchProduct=0x0F95
MatchUdevType=touchpad
ModelPressurePad=1
