INPUT-KBD(8)
β¨ NAME β¨
input-kbd β the little tool that prints or modifies keyboard maps for input devices π (yes bestie, manual name: input-kbd, section 8, it's a sysadmin-flavored baddie)
πΈ SYNOPSIS πΈ
input-kbd num
input-kbd [-f file] devnr
π¦ DESCRIPTION π¦
So input-kbd prints the keyboard map of the kernel input device devnr straight to stdout. And what even is a keyboard map? It's the thing that maps scancodes to keycodes. Scancode goes in, keycode comes out, that's the whole gig β¨
If the device supports a keyboard map, it gets printed in this format β and this is literally the output for an AT keyboard:
0x0001 = 67 # KEY_F9
0x0002 = 65 # KEY_F7
0x0003 = 63 # KEY_F5
0x0004 = 61 # KEY_F3
If the device does not support a keyboard map, no worries, input-kbd just lists the keys and buttons that the device does support, like this (mouse girlies rise up π):
bits: BTN_LEFT
bits: BTN_RIGHT
bits: BTN_MIDDLE
π OPTIONS π
devnrβ the index of the input device you wanna use (0for/dev/input/event0, and so on and so on π’).-f fileβ read a keyboard map from a file and reconfigure the device with that map. If the file name is-then stdin is used, iconic. The map file uses the same format as the output of this command. Blank lines are ignored. A#character and anything following it on the same line are ignored as a comment. Scancodes and keycodes are decimal values unless proceeded by"0x"for hexadecimal. To remove a mapping entirely, set it to0x00(RESERVED). Key names are also accepted instead of keycodes, like this:
0x0001 = KEY_F9
β οΈ Be careful setting values from 0 to 9, because they will be parsed as the key symbols, not the decimal numbers. If you want to list a single-digit decimal keycode, specify it as a hexadecimal value to remove any ambiguity. fr fr, don't get caught lacking by that one π
π AUTHOR π
Gerd Hoffmann <kraxel@redhat.com> β the legend, the moment, the main character π
okay that's the whole page bestie, you ate that π β¨
sign-off vibe check: this gorgeous thing is dated July 2005 and it belongs to source/version INPUT-KBD(8) β periodt ππ¦
π¦ where this page comes from
- debian trixie: input-utils 1.3-2 Β· GPL-2.0-only
- ubuntu questing: input-utils 1.3-2
- ubuntu resolute: input-utils 1.3-3 Β· GPL-2.0-only
- ubuntu stonking: input-utils 1.3-3 Β· GPL-2.0-only
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms