showkey command:linux@devbox:~/tip2> showkey -a
Press any keys - Ctrl-D will terminate this program
A 65 0101 0x41
b 98 0142 0x62
C 67 0103 0x43
^D 4 0004 0x04
Press any keys - Ctrl-D will terminate this program
A 65 0101 0x41
b 98 0142 0x62
C 67 0103 0x43
^D 4 0004 0x04
As you can see, when you type a character, its ASCII code is displayed in decimal, octal, and hexadecimal. When finished entering characters, press
Ctrl+D to exit.ASCII codes are displayed by the
showkey command when the -a option is specified. There are also modes to display scancodes (-s) and keycodes (-k or no argument), but most users will likely find themselves working in ASCII mode most frequently.
No comments:
Post a Comment