A reference guide for mapping keys beyond F12 on Linux systems.
| Layer | F-Key Range | Notes |
|---|---|---|
| Linux Kernel | F1-F24 | Native evdev keycodes |
| XKB (X11/Wayland) | F1-F24 | Mapped via evdev keycodes |
| Qt/KDE | F1-F35 | Full support in Qt framework |
The Linux kernel defines keycodes for F1-F24 in /usr/include/linux/input-event-codes.h:
| Key | Keycode | Notes |
|---|---|---|
| F1-F10 | 59-68 | Standard range |
| F11 | 87 | |
| F12 | 88 | |
| F13 | 183 | Extended keys start here |
| F14 | 184 | |
| F15 | 185 | |
| F16 | 186 | |
| F17 | 187 | |
| F18 | 188 | |
| F19 | 189 | |
| F20 | 190 | |
| F21 | 191 | |
| F22 | 192 | |
| F23 | 193 | |
| F24 | 194 | Highest kernel-supported F-key |
XKB maps these kernel keycodes to symbolic names. The evdev keycode file (/usr/share/X11/xkb/keycodes/evdev) provides aliases:
<FK13> = 191 (alias <I191> = <FK13>) // kernel KEY_F13 = 183
<FK14> = 192 (alias <I192> = <FK14>) // kernel KEY_F14 = 184
...
<FK24> = 202 (alias <I202> = <FK24>) // kernel KEY_F24 = 194
Note: There's an offset between kernel keycodes and XKB keycodes (XKB adds 8 to kernel codes).
Qt defines F-keys up to F35 (Qt::Key_F1 through Qt::Key_F35):
- F1-F24: Fully supported with kernel backing
- F25-F35: Defined in Qt but have no kernel keycode backing
This means KDE Plasma (which uses Qt) can theoretically handle F25-F35 shortcuts, but you cannot generate these keys from hardware or input-remapper since the kernel doesn't define them.
F13-F24 are ideal for custom shortcuts because:
- They're rarely on physical keyboards
- Full kernel + XKB + Qt support
- Can be generated via tools like
input-remapper
- input-remapper: Map any key/button to F13-F24
- xdotool (X11):
xdotool key F13 - ydotool (Wayland):
ydotool key 183:1 183:0 - wtype (Wayland): Can send F13-F24
- KDE Shortcut Dialog: May not accept F13+ in the GUI shortcut picker even though the keys work
- Application Support: Some applications may not recognize F13-F24
- Wayland Compositors: Support varies; KWin (KDE) should work
# Check if a key is being sent (requires sudo)
sudo evtest
# Or use wev on Wayland
wevGenerated by Claude Code. Please verify this information against your specific system configuration.