getkeycodes - Unix, Linux Command


Advertisements


NAME

getkeycodes - print kernel scancode-to-keycode mapping table

SYNOPSIS

getkeycodes

DESCRIPTION

The getkeycodes command prints the kernel scancode-to-keycode mapping table.

OPTIONS

None.

EXAMPLES

Below is the output of getkeycodes command

$ getkeycodes
Plain scancodes xx (hex) versus keycodes (dec)
for 1-83 (0x01-0x53) scancode equals keycode

 0x50:   80  81  82  83  99   0  86  87
 0x58:   88 117   0   0  95 183 184 185
 0x60:    0   0   0   0   0   0   0   0
 0x68:    0   0   0   0   0   0   0   0
 0x70:   93   0   0  89   0   0  85  91
 0x78:   90  92   0  94   0 124 121   0

Escaped scancodes e0 xx (hex)

e0 00:    0   0   0   0   0   0   0   0
e0 08:    0   0   0   0   0   0   0   0
e0 10:  165   0   0   0   0   0   0   0
e0 18:    0 163   0   0  96  97   0   0
e0 20:  113 140 164   0 166   0   0   0
e0 28:    0   0 255   0   0   0 114   0
e0 30:  115   0 150   0   0  98 255  99
e0 38:  100   0   0   0   0   0   0   0
e0 40:    0   0   0   0   0 119 119 102
e0 48:  103 104   0 105 112 106 118 107
e0 50:  108 109 110 111   0   0   0   0
e0 58:    0   0   0 125 126 127 116 142
e0 60:    0   0   0 143   0 217 156 173
e0 68:  128 159 158 157 155 226   0 112
e0 70:    0   0   0   0   0   0   0   0
e0 78:    0   0   0   0   0   0   0   0

Here is what is being shown in above table:
1. Scan code values 0x01 - 0x53 are translated directly to keycode
2. Scan values 0x50 - 0x7f are mapped to decimal values. Example scan code 0x50 maps to decimal value 80, scan value 0x76 maps to decimal 85 and so on
3. The special keys with make scan code starting with 0xe0 and second byte value in the range 0x00 through 0x7f are mapped. For example the home key with make scan code values 0xe0 0x47 maps to keycode 102.

Mappings can be changed using setkeycodes command