INPUT-KBD(8)

πŸ“¦
version 1.3 Β· 2 versions
, in debian trixie, ubuntu questing, ubuntu resolute, ubuntu stonking

✨ 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 (0 for /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 to 0x00 (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