Linux: Find Keyboard Key Scancode

By Xah Lee. Date: . Last updated: .

How find the scancode of a key?

  1. First, switch to Virtual Console. [see Linux: How to use Virtual Console]
  2. Then, type showkey --scancodes.
  3. Then, type any key, it'll print its scancode in hexadecimal.
  4. 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

Linux Keybinding How-to

  1. Keyboard Software Guide
  2. Swap Control Alt Keys
  3. Set F2 F3 F4 to Cut Copy Paste
  4. CapsLock → Escape
  5. CapsLock → Home
  6. Shift Lock
  7. Key to Switch App
  8. Key Repeat Rate
  9. System Keyboard Layout
  10. Switch Keyboard Layout
  11. Change Volume
  12. xmodmap
  13. xbindkeys
  14. xvkbd
  15. Find Keyboard Key Scancode
  16. X11 Keyboard Key Names

If you have a question, put $5 at patreon and message me.