]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
hwdb: keyboard: Ignore duplicate atkbd keypresses on touchpad on/off toggle
authorHans de Goede <hdegoede@redhat.com>
Sat, 22 May 2021 17:42:21 +0000 (19:42 +0200)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Sat, 22 May 2021 18:50:36 +0000 (20:50 +0200)
The atkbd device on the Lenovo Yoga 300-11IBR 2-in-1 sends unknown
keycodes when the touchpad is toggled on/off:

[ 1918.995562] atkbd serio0: Unknown key pressed (translated set 2, code 0x63 on isa0060/serio0).
[ 1918.995610] atkbd serio0: Use 'setkeycodes 63 <keycode>' to make it known.
[ 1919.032121] atkbd serio0: Unknown key released (translated set 2, code 0x63 on isa0060/serio0).
[ 1919.032135] atkbd serio0: Use 'setkeycodes 63 <keycode>' to make it known.
[ 1926.098414] atkbd serio0: Unknown key pressed (translated set 2, code 0x62 on isa0060/serio0).
[ 1926.098461] atkbd serio0: Use 'setkeycodes 62 <keycode>' to make it known.
[ 1926.146537] atkbd serio0: Unknown key released (translated set 2, code 0x62 on isa0060/serio0).
[ 1926.146583] atkbd serio0: Use 'setkeycodes 62 <keycode>' to make it known.

The "Ideapad extra buttons" driver alreadys sends f22 / f23 key-events
when the touchpad is toggles off, so map the keycodes for the duplicate
atkbd events to unknown to silence these kernel warnings.

hwdb.d/60-keyboard.hwdb

index 1905db769b78a545b895931f566c9151744a5f39..8ac90b6df110c0650dfc6b636e45c6a501d02a19 100644 (file)
@@ -878,6 +878,10 @@ evdev:atkbd:dmi:bvn*:bvr*:svnLENOVO*:pn*IdeaPad*Z370*:*
  KEYBOARD_KEY_ae=!volumedown
  KEYBOARD_KEY_b0=!volumeup
 
+evdev:atkbd:dmi:*:svnLENOVO:*:pvrLenovoYoga300-11IBR:*
+ KEYBOARD_KEY_62=unknown  # Touchpad on, also emitted by "Ideapad extra buttons", ignore
+ KEYBOARD_KEY_63=unknown  # Touchpad off, also emitted by "Ideapad extra buttons", ignore
+
 # Fix for volume keys on Lenovo Yoga S940
 # For 10th gen it should be pn81Q8 instead of pn81Q7 but
 # I don't have a device to test