Show keys pressed in Linux

Others have mentioned xev, which is good when you're running X11. When you're at the console, however, showkey is what you want.

And if you’re at an SSH session or a real terminal, you can use /usr/lib/ncurses/examples/demo_altkeys (available in Debian in the ncurses-examples package).

Note that xev for "a" gives 38, while showkey for "a" gives 30, because xev reports scancodes, whereas showkey by default reports keycodes.


Also screenkey, a screencast tool that displays keys being pressed on-screen.


There is the xev program for graphic mode - see the man page of xev.

On Ubuntu/Debian it is packed into the x11-utils package.

Tags:

Linux

Keyboard