A usefull command if are want to read keyboard input : showkey
. Very useful to know keycodes when programming.
What is showkey ?#
showkey - examine the codes sent by the keyboard
How does it work ?#
showkey
have only 3 options (4 with help) :
-s --scancodes
: Starts showkey in scan code dump mode.-k --keycodes
: Starts showkey in keycode dump mode. This is the default, when no command line options are present.-a --ascii
: Starts showkey in `ascii' dump mode.
Note : Only -a
will fully works on X mode (with a graphical terminal), -s
and -k
mode may work on X mode if you have root permissions else use a text console (TTY 1 to 6).