It has taken until 2025 for the AT/PS2 keyboard driver to map F13 through F24 function keys by default. But that day has come and the support was merged today as part of the input driver changes for the Linux 6.17 kernel.
Werner Sembach with TUXEDO Computers took care of the ATKBD driver patch so that PS/2 keyboards will see their F13 through F24 function keys where present to be correctly mapped by default. Sembach explained in the patch to provide the correct mapping:
“- 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.”
Microsoft Windows has long recognized the F13 through F24 keys although not commonly implemented as physical buttons on most keyboards but rather left for macro key combinations and custom bindings. Plus some specialized keyboards out there like the Unicomp PC 122:
Today’s input merge for Linux 6.17 also includes improvements to the Samsung keypad driver, evdev input handling enhancements, and new capacity buttons and forcepad button function sub-drivers for the Synaptics RMI driver. The Goodix touchscreen driver also now supports a polling mode, support for FocalTech FT8716 in the edt-ft5x06 driver, and other input driver changes.