getkeycodes
Show keycode-to-keysym mappings of input devices
SYNOPSIS
getkeycodes
DESCRIPTION
The getkeycodes command in Linux allows you to display the current kernel keycode-to-scancode mapping table.
This table is used by the kernel to translate the raw scancodes received from the keyboard into meaningful keycodes that applications can understand.
The command displays this mapping, showing which scancode corresponds to which keycode. This can be useful for debugging keyboard issues, creating custom keyboard layouts, or understanding how the keyboard interacts with the kernel.
By inspecting the output of getkeycodes, you can identify which key presses are generating which scancodes and keycodes.
It's particularly helpful when dealing with non-standard keyboards or when needing to remap keys to different functions. The command is intended for system administrators and developers who need a deeper understanding of keyboard input and how it is processed by the Linux kernel.
It works on a low level and allows to inspect how the kernel interprets keyboard input.
USAGE NOTES
getkeycodes displays output in pairs of scancode and keycode. Scancodes are hardware-specific values generated by the keyboard, while keycodes are abstract values used by the kernel.
Understanding these mappings allows for key remapping using tools like setkeycodes.
HISTORY
The getkeycodes command has been part of the Linux kernel utilities for a long time, providing a tool to introspect and manage the keyboard mapping. It evolved alongside the Linux input subsystem, reflecting the changing needs of keyboard handling and remapping capabilities. Its usage is strongly tied to systems where key remapping or analysis of keyboard input is necessary.
SEE ALSO
setkeycodes(1)