Linux: Find Keyboard Key Scancode
How find the scancode of a key?
- Switch to Linux: Virtual Terminal, by Ctrl+Alt+F1.
- Type
showkey --scancodes
. - Type any key, it'll print its scancode in hexadecimal.
- To exit, just wait for 10 seconds.
Note: you must switch to virtual console for this to work. Normal terminal won't work.
See man showkey
and showkey --help