commands.sh

showkey

linux

Display the keycode of pressed keys on the keyboard, helpful for debugging keyboard-related issues and key remapping.

More info →

Options (3)

-s, --scancodesboolean

Display scancodes in hexadecimal

Example: sudo showkey {{[-s|--scancodes]}}
-k, --keycodesboolean

Display keycodes in decimal (default)

Example: sudo showkey {{[-k|--keycodes]}}
-a, --asciiboolean

Display keycodes in ASCII, decimal, and hexadecimal

Example: sudo showkey {{[-a|--ascii]}}

Examples (5)

View keycodes in decimal

Display scancodes in hexadecimal

sudo showkey [-s|--scancodes]

Display keycodes in decimal (default)

sudo showkey [-k|--keycodes]

Display keycodes in ASCII, decimal, and hexadecimal

sudo showkey [-a|--ascii]

Exit the program

<Ctrl d>
made by @shridhargupta | data from tldr-pages