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 Topic

  1. Linux: Keyboard Software Guide
  2. Linux: Swap Control Alt Keys, xmodmap
  3. Linux: Set F2 F3 F4 to Cut Copy Paste
  4. Linux: Swap CapsLock Escape Keys
  5. Linux: Make CapsLock Do Home Key
  6. Linux: Setup Shift Lock Key
  7. Linux: Add Keyboard Shortcut to Switch App
  8. Linux: Set Key Repeat Rate
  9. Linux: Set System Keyboard Layout
  10. Linux: How to Switch to Dvorak Keyboard Layout
  11. Linux: Change Volume by Command
  12. Linux: xmodmap Tutorial
  13. Linux: xbindkeys Tutorial
  14. Linux: xvkbd tutorial
  15. Linux: Find Keyboard Key Scancode
  16. Linux: X11 Keyboard Key Names

Ask me question on patreon