Input: atkbd - correctly map F13 - F24
authorWerner Sembach <wse@tuxedocomputers.com>
Tue, 22 Jul 2025 12:04:35 +0000 (14:04 +0200)
committerDmitry Torokhov <dmitry.torokhov@gmail.com>
Sun, 27 Jul 2025 08:41:20 +0000 (01:41 -0700)
commit17eabb792740cea3f24b236e150f9fee8cd344f3
tree9c954575885f4dda52d757b64997f0a08934321d
parente7412ba919f625438c570d8b4fbf16c5f31b583d
Input: atkbd - correctly map F13 - F24

Currently only F23 is correctly mapped for PS/2 keyboards.

According to this table:
https://download.microsoft.com/download/1/6/1/161ba512-40e2-4cc9-843a-923143f3456c/translate.pdf

- F24 and Zenkaku/Hankaku share the same scancode, but since in real world
Zenkaku/Hankaku keys seem to just use the tilde scancode, this patch binds the
scancode to F24. Note that on userspace side the KEY_ZENKAKUHANKAKU keycode is
currently not bound in xkeyboard-config, so it is (mostly*) unused anyway.

* Qt on Wayland and therefore KDE on Wayland can see the keypress anyway for
some reason and it is actually used in a touchpad toggle shortcut, but this is
currently being fixed in both KDE and xkeyboard-config to make this less weird,
so it could directly be fixed to correctly handle the F24 keypress instead.

- The scancodes for F13-F22 are currently unmapped so there will probably be no
harm in mapping them. This would also fix the issue that some of these keys
can't be mapped as the target from userspace using the `setkeycodes` command.

Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Werner Sembach <wse@tuxedocomputers.com>
Link: https://lore.kernel.org/r/20250722120438.28011-1-wse@tuxedocomputers.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
drivers/input/keyboard/atkbd.c