Skip to content

Instantly share code, notes, and snippets.

@shenghaoyang
Last active April 22, 2022 00:22
Show Gist options
  • Save shenghaoyang/d83e71b65ecf6a694d9596f09bf8d3a5 to your computer and use it in GitHub Desktop.
Save shenghaoyang/d83e71b65ecf6a694d9596f09bf8d3a5 to your computer and use it in GitHub Desktop.
Duplicate keycodes

Device: HP Zook15v

In Linux, keyboard keys (Fn + F2) & (Fn + F3) resolve to the same scancode:

dmesg:

[  343.043330] atkbd serio0: Unknown key pressed (translated set 2, code 0xab on isa0060/serio0).
[  343.043336] atkbd serio0: Use 'setkeycodes e02b <keycode>' to make it known.
[  343.053302] atkbd serio0: Unknown key released (translated set 2, code 0xab on isa0060/serio0).
[  343.053307] atkbd serio0: Use 'setkeycodes e02b <keycode>' to make it known.
[  343.605722] atkbd serio0: Unknown key pressed (translated set 2, code 0xab on isa0060/serio0).
[  343.605728] atkbd serio0: Use 'setkeycodes e02b <keycode>' to make it known.
[  343.616897] atkbd serio0: Unknown key released (translated set 2, code 0xab on isa0060/serio0).
[  343.616902] atkbd serio0: Use 'setkeycodes e02b <keycode>' to make it known.

evtest:

Event: time 1535280120.029012, type 4 (EV_MSC), code 4 (MSC_SCAN), value ab
Event: time 1535280120.029012, -------------- SYN_REPORT ------------
Event: time 1535280120.039348, type 4 (EV_MSC), code 4 (MSC_SCAN), value ab
Event: time 1535280120.039348, -------------- SYN_REPORT ------------
Event: time 1535280120.968715, type 4 (EV_MSC), code 4 (MSC_SCAN), value ab
Event: time 1535280120.968715, -------------- SYN_REPORT ------------
Event: time 1535280120.979094, type 4 (EV_MSC), code 4 (MSC_SCAN), value ab
Event: time 1535280120.979094, -------------- SYN_REPORT ------------
Event: time 1535280121.632686, type 4 (EV_MSC), code 4 (MSC_SCAN), value ab
Event: time 1535280121.632686, -------------- SYN_REPORT ------------
Event: time 1535280121.644769, type 4 (EV_MSC), code 4 (MSC_SCAN), value ab
Event: time 1535280121.644769, -------------- SYN_REPORT ------------
Event: time 1535280121.938835, type 4 (EV_MSC), code 4 (MSC_SCAN), value ab
Event: time 1535280121.938835, -------------- SYN_REPORT ------------
Event: time 1535280121.951024, type 4 (EV_MSC), code 4 (MSC_SCAN), value ab
Event: time 1535280121.951024, -------------- SYN_REPORT ------------

The keyboard keys should be handled by the hp_wmi driver, but it seems there was some problem with that:

dmesg | grep "hp_wmi":

[    3.003593] hp_wmi: query 0xd returned error 0x5
@Masteroduo
Copy link

Hi, Sorry to bump into an old thread but did you manage to fix this issue? I have the exact same issue on my HP 15-da2005ne running Fedora and it has been driving me mental.
Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment