Codebase list kbd / upstream/1.03wip
1.03wip Alexey Gladkov 17 years ago
91 changed file(s) with 2556 addition(s) and 75 deletion(s). Raw diff Collapse all Expand all
1414 # Do not use GZIP - it is interpreted by gzip
1515 MYGZIP = gzip -f -9
1616
17 DIR = kbd-1.01wip
17 DIR = kbd-1.03wip
1818
1919 SUBDIRS = src openvt po
2020
125125 echo "(Otherwise, edit defines.h and delete the line with ENABLE_NLS)"
126126 ENABLE_NLS=yes
127127 else
128 echo "You don't have <libintl.h>"
128 echo "You don't have <libintl.h> and gettext()"
129129 ENABLE_NLS=no
130130 fi
131131 else
66 install -d -m 755 $(DATADIR)/$(TRANSDIR)
77 install -m 644 $(TRANSDIR)/* $(DATADIR)/$(TRANSDIR)
88 install -d -m 755 $(DATADIR)/$(UNIMAPDIR)
9 install -m 644 $(TRANSDIR)/* $(DATADIR)/$(UNIMAPDIR)
9 install -m 644 $(UNIMAPDIR)/* $(DATADIR)/$(UNIMAPDIR)
1010 install -d -m 755 $(DATADIR)/$(KEYMAPDIR)
1111 install -d -m 755 $(DATADIR)/$(KEYMAPDIR)/i386
1212 for i in $(KEYMAPSUBDIRS); do \
00 Greek fonts found in kbd-1.00.tar.gz:
11
22 iso07.* follows ISO 8859-7.
3
4 gr928* refers to elot928 which is the same.
5 (plain gr928 is elot928 with cp437 control chars;
6 gr928a* is gr928 with Euro at the 0xa4 position;
7 gr928b* is gr928 with the cp437 symbols in the 0x80-0x9f positions
8 and a filler symbol on the positions empty in ISO 8859-7)
39
410 gr737* somewhat follow cp737.
511 (gr737a* is cp737 with cp437 control chars;
data/consolefonts/gr.f14 less more
Binary diff not shown
data/consolefonts/gr.f16 less more
Binary diff not shown
data/consolefonts/gr928-9x14 less more
Binary diff not shown
data/consolefonts/gr928-9x16 less more
Binary diff not shown
data/consolefonts/gr928thin.fnt less more
Binary diff not shown
data/consolefonts/greek.16 less more
Binary diff not shown
data/consolefonts/grfixed.16 less more
Binary diff not shown
Binary diff not shown
Binary diff not shown
Binary diff not shown
+0
-5
data/consolefonts/iso07.08 less more
0 # combine partial fonts
1 none.00-17.08
2 ascii.20-7f.08
3 none.00-17.08
4 8859-7.a0-ff.08
data/consolefonts/iso07courier.16.psfu less more
Binary diff not shown
data/consolefonts/koi8u_8x14.psf less more
Binary diff not shown
data/consolefonts/koi8u_8x16.psf less more
Binary diff not shown
data/consolefonts/koi8u_8x8.psf less more
Binary diff not shown
data/consolefonts/lat9-12.psfu less more
Binary diff not shown
data/consolefonts/lat9-14.psfu less more
Binary diff not shown
data/consolefonts/lat9-16.psfu less more
Binary diff not shown
data/consolefonts/lat9u-08.psf less more
Binary diff not shown
data/consolefonts/lat9u-10.psf less more
Binary diff not shown
data/consolefonts/lat9u-12.psf less more
Binary diff not shown
data/consolefonts/lat9u-14.psf less more
Binary diff not shown
data/consolefonts/lat9u-16.psf less more
Binary diff not shown
data/consolefonts/lat9v-08.psf less more
Binary diff not shown
data/consolefonts/lat9v-10.psf less more
Binary diff not shown
data/consolefonts/lat9v-12.psf less more
Binary diff not shown
data/consolefonts/lat9v-14.psf less more
Binary diff not shown
data/consolefonts/lat9v-16.psf less more
Binary diff not shown
data/consolefonts/lat9w-08.psf less more
Binary diff not shown
data/consolefonts/lat9w-10.psf less more
Binary diff not shown
data/consolefonts/lat9w-12.psf less more
Binary diff not shown
data/consolefonts/lat9w-14.psf less more
Binary diff not shown
data/consolefonts/lat9w-16.psf less more
Binary diff not shown
0 # English <- Control+RightShift -> Russion
1 # English <- Control+LeftShift -> Bielorussion
2 #
3 # Svistunovich Oleg Georgievich
4 # Minsk, UGAI GUVD Mingorispolkoma
5
6 charset "iso-8859-5"
7 keymaps 0,1,4,8,9,12,16,17,20,24,25,28,32,33,36,40,41,44
8 strings as usual
9
10 keycode 1 = Escape Escape Escape \
11 Meta_Escape Meta_Escape Meta_Escape \
12 Escape Escape Escape \
13 Meta_Escape Meta_Escape Meta_Escape \
14 Escape Escape Escape \
15 Meta_Escape Meta_Escape Meta_Escape
16 keycode 2 = one exclam VoidSymbol \
17 Meta_one Meta_exclam VoidSymbol \
18 one exclam VoidSymbol \
19 Meta_one Meta_exclam VoidSymbol \
20 one exclam VoidSymbol \
21 Meta_one Meta_exclam VoidSymbol
22 keycode 3 = two at nul \
23 Meta_two Meta_at Meta_nul \
24 two quotedbl nul \
25 Meta_two Meta_quotedbl Meta_nul \
26 two quotedbl VoidSymbol \
27 Meta_two Meta_quotedbl VoidSymbol
28 keycode 4 = three numbersign Escape \
29 Meta_three Meta_numbersign Meta_Escape \
30 three numbersign Escape \
31 Meta_three Meta_numbersign Meta_Escape \
32 three numbersign Escape \
33 Meta_three Meta_numbersign Meta_Escape
34 keycode 5 = four dollar Control_backslash \
35 Meta_four Meta_dollar Meta_Control_backslash \
36 four semicolon Control_backslash \
37 Meta_four Meta_semicolon Meta_Control_backslash \
38 four semicolon Control_backslash \
39 Meta_four Meta_semicolon Meta_Control_backslash
40 keycode 6 = five percent Control_bracketright \
41 Meta_five Meta_percent Meta_Control_bracketright \
42 five percent Control_bracketright \
43 Meta_five Meta_percent Meta_Control_bracketright \
44 five percent Control_bracketright \
45 Meta_five Meta_percent Meta_Control_bracketright
46 keycode 7 = six asciicircum Control_asciicircum \
47 Meta_six Meta_asciicircum Meta_Control_asciicircum \
48 six colon Control_asciicircum \
49 Meta_six Meta_colon Meta_Control_asciicircum \
50 six colon Control_asciicircum \
51 Meta_six Meta_colon Meta_Control_asciicircum
52 keycode 8 = seven ampersand Control_underscore \
53 Meta_seven Meta_ampersand Meta_Control_underscore \
54 seven question Control_underscore \
55 Meta_seven Meta_question Meta_Control_underscore \
56 seven question Control_underscore \
57 Meta_seven Meta_question Meta_Control_underscore
58 keycode 9 = eight asterisk Delete \
59 Meta_eight Meta_asterisk Meta_Delete \
60 eight asterisk Delete \
61 Meta_eight Meta_asterisk Meta_Delete \
62 eight asterisk Delete \
63 Meta_eight Meta_asterisk Meta_Delete
64 keycode 10 = nine parenleft VoidSymbol \
65 Meta_nine Meta_parenleft VoidSymbol \
66 nine parenleft VoidSymbol \
67 Meta_nine Meta_parenleft VoidSymbol \
68 nine parenleft VoidSymbol \
69 Meta_nine Meta_parenleft VoidSymbol
70 keycode 11 = zero parenright VoidSymbol \
71 Meta_zero Meta_parenleft VoidSymbol \
72 zero parenright VoidSymbol \
73 Meta_zero Meta_parenleft VoidSymbol \
74 zero parenright VoidSymbol \
75 Meta_zero Meta_parenleft VoidSymbol
76 keycode 12 = minus underscore Control_underscore \
77 Meta_minus Meta_underscore Meta_Control_underscore \
78 minus underscore Control_underscore \
79 Meta_minus Meta_underscore Meta_Control_underscore \
80 minus underscore Control_underscore \
81 Meta_minus Meta_underscore Meta_Control_underscore
82 keycode 13 = equal plus VoidSymbol \
83 Meta_equal Meta_plus VoidSymbol \
84 equal plus VoidSymbol \
85 Meta_equal Meta_plus VoidSymbol \
86 equal plus VoidSymbol \
87 Meta_equal Meta_plus VoidSymbol
88 keycode 14 = Delete Delete Delete \
89 Meta_Delete Meta_Delete Meta_Delete \
90 Delete Delete Delete \
91 Meta_Delete Meta_Delete Meta_Delete \
92 Delete Delete Delete \
93 Meta_Delete Meta_Delete Meta_Delete
94 keycode 15 = Tab Tab Tab \
95 Meta_Tab Meta_Tab Meta_Tab \
96 Tab Tab Tab \
97 Meta_Tab Meta_Tab Meta_Tab \
98 Tab Tab Tab \
99 Meta_Tab Meta_Tab Meta_Tab
100 keycode 16 = +q +Q Control_q \
101 Meta_q Meta_Q Meta_Control_q \
102 +0xD9 +0xB9 Control_q \
103 Meta_q Meta_Q Meta_Control_q \
104 +0xD9 +0xB9 Control_q \
105 Meta_q Meta_Q Meta_Control_q
106 keycode 17 = +w +W Control_w \
107 Meta_w Meta_W Meta_Control_w \
108 +0xE6 +0xC6 Control_w \
109 Meta_w Meta_W Meta_Control_w \
110 +0xE6 +0xC6 Control_w \
111 Meta_w Meta_W Meta_Control_w
112 keycode 18 = +e +E Control_e \
113 Meta_e Meta_E Meta_Control_e \
114 +0xE3 +0xC3 Control_e \
115 Meta_e Meta_E Meta_Control_e \
116 +0xE3 +0xC3 Control_e \
117 Meta_e Meta_E Meta_Control_e
118 keycode 19 = +r +R Control_r \
119 Meta_r Meta_R Meta_Control_r \
120 +0xDA +0xBA Control_r \
121 Meta_r Meta_R Meta_Control_r \
122 +0xDA +0xBA Control_r \
123 Meta_r Meta_R Meta_Control_r
124 keycode 20 = +t +T Control_t \
125 Meta_t Meta_T Meta_Control_t \
126 +0xD5 +0xB5 Control_t \
127 Meta_t Meta_T Meta_Control_t \
128 +0xD5 +0xB5 Control_t \
129 Meta_t Meta_T Meta_Control_t
130 keycode 21 = +y +Y Control_y \
131 Meta_y Meta_Y Meta_Control_y \
132 +0xDD +0xBD Control_y \
133 Meta_y Meta_Y Meta_Control_y \
134 +0xDD +0xBD Control_y \
135 Meta_y Meta_Y Meta_Control_y
136 keycode 22 = +u +U Control_u \
137 Meta_u Meta_U Meta_Control_u \
138 +0xD3 +0xB3 Control_u \
139 Meta_u Meta_U Meta_Control_u \
140 +0xD3 +0xB3 Control_u \
141 Meta_u Meta_U Meta_Control_u
142 keycode 23 = +i +I Tab \
143 Meta_i Meta_I Meta_Tab \
144 +0xE8 +0xC8 Tab \
145 Meta_i Meta_I Meta_Tab \
146 +0xE8 +0xC8 Tab \
147 Meta_i Meta_I Meta_Tab
148 keycode 24 = +o +O Control_o \
149 Meta_o Meta_O Meta_Control_o \
150 +0xF6 +0xA6 Control_o \
151 Meta_o Meta_O Meta_Control_o \
152 +0xE9 +0xC9 Control_o \
153 Meta_o Meta_O Meta_Control_o
154 keycode 25 = +p +P Control_p \
155 Meta_p Meta_P Meta_Control_p \
156 +0xD7 +0xB7 Control_p \
157 Meta_p Meta_P Meta_Control_p \
158 +0xD7 +0xB7 Control_p \
159 Meta_p Meta_P Meta_Control_p
160 keycode 26 = bracketleft braceleft Escape \
161 Meta_bracketleft Meta_braceleft Meta_Escape \
162 +0xE5 +0xC5 Escape \
163 Meta_bracketleft Meta_braceleft Meta_Escape \
164 +0xE5 +0xC5 Escape \
165 Meta_bracketleft Meta_braceleft Meta_Escape
166 keycode 27 = bracketright braceright Control_bracketright \
167 Meta_bracketright Meta_braceright Meta_Control_bracketright \
168 +0xFE +0xAE Control_bracketright \
169 Meta_bracketright Meta_braceright Meta_Control_bracketright \
170 +0xEA +0xCA Control_bracketright \
171 Meta_bracketright Meta_braceright Meta_Control_bracketright
172 keycode 28 = Return Return Return \
173 Meta_Control_m Meta_Control_m Return \
174 Return Return Return \
175 Meta_Control_m Meta_Control_m Return \
176 Return Return Return \
177 Meta_Control_m Meta_Control_m Return
178 keycode 29 = Control Control Control \
179 Control Control Control \
180 Control Control Control \
181 Control Control Control \
182 Control Control Control \
183 Control Control Control
184 keycode 30 = +a +A Control_a \
185 Meta_a Meta_A Meta_Control_a \
186 +0xE4 +0xC4 Control_a \
187 Meta_a Meta_A Meta_Control_a \
188 +0xE4 +0xC4 Control_a \
189 Meta_a Meta_A Meta_Control_a
190 keycode 31 = +s +S Control_s \
191 Meta_s Meta_S Meta_Control_s \
192 +0xEB +0xCB Control_s \
193 Meta_s Meta_S Meta_Control_s \
194 +0xEB +0xCB Control_s \
195 Meta_s Meta_S Meta_Control_s
196 keycode 32 = +d +D Control_d \
197 Meta_d Meta_D Meta_Control_d \
198 +0xD2 +0xB2 Control_d \
199 Meta_d Meta_D Meta_Control_d \
200 +0xD2 +0xB2 Control_d \
201 Meta_d Meta_D Meta_Control_d
202 keycode 33 = +f +F Control_f \
203 Meta_f Meta_F Meta_Control_f \
204 +0xD0 +0xB0 Control_f \
205 Meta_f Meta_F Meta_Control_f \
206 +0xD0 +0xB0 Control_f \
207 Meta_f Meta_F Meta_Control_f
208 keycode 34 = +g +G Control_g \
209 Meta_g Meta_G Meta_Control_g \
210 +0xDF +0xBF Control_g \
211 Meta_g Meta_G Meta_Control_g \
212 +0xDF +0xBF Control_g \
213 Meta_g Meta_G Meta_Control_g
214 keycode 35 = +h +H BackSpace \
215 Meta_h Meta_H Meta_BackSpace \
216 +0xE0 +0xC0 BackSpace \
217 Meta_h Meta_H Meta_BackSpace \
218 +0xE0 +0xC0 BackSpace \
219 Meta_h Meta_H Meta_BackSpace
220 keycode 36 = +j +J Linefeed \
221 Meta_j Meta_J Meta_Linefeed \
222 +0xDE +0xBE Linefeed \
223 Meta_j Meta_J Meta_Linefeed \
224 +0xDE +0xBE Linefeed \
225 Meta_j Meta_J Meta_Linefeed
226 keycode 37 = +k +K Control_k \
227 Meta_k Meta_K Meta_Control_k \
228 +0xDB +0xBB Control_k \
229 Meta_k Meta_K Meta_Control_k \
230 +0xDB +0xBB Control_k \
231 Meta_k Meta_K Meta_Control_k
232 keycode 38 = +l +L Control_l \
233 Meta_l Meta_L Meta_Control_l \
234 +0xD4 +0xB4 Control_l \
235 Meta_l Meta_L Meta_Control_l \
236 +0xD4 +0xB4 Control_l \
237 Meta_l Meta_L Meta_Control_l
238 keycode 39 = semicolon colon VoidSymbol \
239 Meta_semicolon Meta_colon VoidSymbol \
240 +0xD6 +0xB6 VoidSymbol \
241 Meta_semicolon Meta_colon VoidSymbol \
242 +0xD6 +0xB6 VoidSymbol \
243 Meta_semicolon Meta_colon VoidSymbol
244 keycode 40 = apostrophe quotedbl Control_g \
245 Meta_apostrophe Meta_quotedbl VoidSymbol \
246 +0xED +0xCD Control_g \
247 Meta_apostrophe Meta_quotedbl VoidSymbol \
248 +0xED +0xCD Control_g \
249 Meta_apostrophe Meta_quotedbl VoidSymbol
250 keycode 41 = grave asciitilde nul \
251 Meta_grave Meta_asciitilde VoidSymbol \
252 +0xF1 +0xA1 nul \
253 Meta_grave Meta_asciitilde VoidSymbol \
254 +0xF1 +0xA1 nul \
255 Meta_grave Meta_asciitilde VoidSymbol
256 keycode 42 = Shift Shift ShiftL_Lock \
257 Shift Shift Shift \
258 Shift Shift ShiftL_Lock \
259 Shift Shift Shift \
260 Shift Shift Shift \
261 Shift Shift Shift
262 keycode 43 = backslash bar Control_backslash \
263 Meta_backslash Meta_bar Control_backslash \
264 backslash bar Control_backslash \
265 Meta_backslash Meta_bar Control_backslash \
266 backslash bar Control_backslash \
267 Meta_backslash Meta_bar Control_backslash
268 keycode 44 = +z +Z Control_z \
269 Meta_z Meta_Z Meta_Control_z \
270 +0xEF +0xCF Control_z \
271 Meta_z Meta_Z Meta_Control_z \
272 +0xEF +0xCF Control_z \
273 Meta_z Meta_Z Meta_Control_z
274 keycode 45 = +x +X Control_x \
275 Meta_x Meta_X Meta_Control_x \
276 +0xE7 +0xC7 Control_x \
277 Meta_x Meta_X Meta_Control_x \
278 +0xE7 +0xC7 Control_x \
279 Meta_x Meta_X Meta_Control_x
280 keycode 46 = +c +C Control_c \
281 Meta_c Meta_C Meta_Control_c \
282 +0xE1 +0xC1 Control_c \
283 Meta_c Meta_C Meta_Control_c \
284 +0xE1 +0xC1 Control_c \
285 Meta_c Meta_C Meta_Control_c
286 keycode 47 = +v +V Control_v \
287 Meta_v Meta_V Meta_Control_v \
288 +0xDC +0xBC Control_v \
289 Meta_v Meta_V Meta_Control_v \
290 +0xDC +0xBC Control_v \
291 Meta_v Meta_V Meta_Control_v
292 keycode 48 = +b +B Control_b \
293 Meta_b Meta_B Meta_Control_b \
294 +0xD8 +0xB8 Control_b \
295 Meta_b Meta_B Meta_Control_b \
296 +0xD8 +0xB8 Control_b \
297 Meta_b Meta_B Meta_Control_b
298 keycode 49 = +n +N Control_n \
299 Meta_n Meta_N Meta_Control_n \
300 +0xE2 +0xC2 Control_t \
301 Meta_n Meta_N Meta_Control_n \
302 +0xE2 +0xC2 Control_t \
303 Meta_n Meta_N Meta_Control_n
304 keycode 50 = +m +M Control_m \
305 Meta_m Meta_M Meta_Control_m \
306 +0xEC +0xCC Control_m \
307 Meta_m Meta_M Meta_Control_m \
308 +0xEC +0xCC Control_m \
309 Meta_m Meta_M Meta_Control_m
310 keycode 51 = comma less VoidSymbol \
311 Meta_comma Meta_less VoidSymbol \
312 +0xD1 +0xB1 VoidSymbol \
313 Meta_comma Meta_less VoidSymbol \
314 +0xD1 +0xB1 VoidSymbol \
315 Meta_comma Meta_less VoidSymbol
316 keycode 52 = period greater VoidSymbol \
317 Meta_period Meta_greater VoidSymbol \
318 +0xEE +0xCE VoidSymbol \
319 Meta_period Meta_greater VoidSymbol \
320 +0xEE +0xCE VoidSymbol \
321 Meta_period Meta_greater VoidSymbol
322 keycode 53 = slash question Delete \
323 Meta_slash Meta_question VoidSymbol \
324 period comma Delete \
325 Meta_slash Meta_question VoidSymbol \
326 period comma Delete \
327 Meta_slash Meta_question VoidSymbol
328 keycode 54 = Shift Shift ShiftR_Lock \
329 Shift Shift Shift \
330 Shift Shift Shift \
331 Shift Shift Shift \
332 Shift Shift ShiftR_Lock \
333 Shift Shift Shift
334 keycode 55 = KP_Multiply KP_Multiply Hex_C \
335 KP_Multiply KP_Multiply KP_Multiply \
336 KP_Multiply KP_Multiply Hex_C \
337 KP_Multiply KP_Multiply KP_Multiply \
338 KP_Multiply KP_Multiply Hex_C \
339 KP_Multiply KP_Multiply KP_Multiply
340 keycode 56 = Alt
341 keycode 57 = space space nul \
342 Meta_space Meta_space Meta_nul \
343 space space nul \
344 Meta_space Meta_space Meta_nul \
345 space space nul \
346 Meta_space Meta_space Meta_nul
347 keycode 58 = Caps_Lock
348 keycode 59 = F1 F13 F25 \
349 Console_1 Console_13 Console_1 \
350 F1 F13 F25 \
351 Console_1 Console_13 Console_1 \
352 F1 F13 F25 \
353 Console_1 Console_13 Console_1
354 keycode 60 = F2 F14 F26 \
355 Console_2 Console_14 Console_2 \
356 F2 F14 F26 \
357 Console_2 Console_14 Console_2 \
358 F2 F14 F26 \
359 Console_2 Console_14 Console_2
360 keycode 61 = F3 F15 F27 \
361 Console_3 Console_15 Console_3 \
362 F3 F15 F27 \
363 Console_3 Console_15 Console_3 \
364 F3 F15 F27 \
365 Console_3 Console_15 Console_3
366 keycode 62 = F4 F16 F28 \
367 Console_4 Console_16 Console_4 \
368 F4 F16 F28 \
369 Console_4 Console_16 Console_4 \
370 F4 F16 F28 \
371 Console_4 Console_16 Console_4
372 keycode 63 = F5 F17 F29 \
373 Console_5 Console_17 Console_5 \
374 F5 F17 F29 \
375 Console_5 Console_17 Console_5 \
376 F5 F17 F29 \
377 Console_5 Console_17 Console_5
378 keycode 64 = F6 F18 F30 \
379 Console_6 Console_18 Console_6 \
380 F6 F18 F30 \
381 Console_6 Console_18 Console_6 \
382 F6 F18 F30 \
383 Console_6 Console_18 Console_6
384 keycode 65 = F7 F19 F31 \
385 Console_7 Console_19 Console_7 \
386 F7 F19 F31 \
387 Console_7 Console_19 Console_7 \
388 F7 F19 F31 \
389 Console_7 Console_19 Console_7
390 keycode 66 = F8 F20 F32 \
391 Console_8 Console_20 Console_8 \
392 F8 F20 F32 \
393 Console_8 Console_20 Console_8 \
394 F8 F20 F32 \
395 Console_8 Console_20 Console_8
396 keycode 67 = F9 F21 F33 \
397 Console_9 Console_21 Console_9 \
398 F9 F21 F33 \
399 Console_9 Console_21 Console_9 \
400 F9 F21 F33 \
401 Console_9 Console_21 Console_9
402 keycode 68 = F10 F22 F34 \
403 Console_10 Console_22 Console_10 \
404 F10 F22 F34 \
405 Console_10 Console_22 Console_10 \
406 F10 F22 F34 \
407 Console_10 Console_22 Console_10
408 keycode 69 = Num_Lock Num_Lock Hex_E \
409 Num_Lock Num_Lock Num_Lock \
410 Num_Lock Num_Lock Hex_E \
411 Num_Lock Num_Lock Num_Lock \
412 Num_Lock Num_Lock Hex_E \
413 Num_Lock Num_Lock Num_Lock
414 keycode 70 = Scroll_Lock Show_Memory Show_State \
415 Show_Registers VoidSymbol Scroll_Lock \
416 Scroll_Lock Show_Memory Show_State \
417 Show_Registers VoidSymbol Scroll_Lock \
418 Scroll_Lock Show_Memory Show_State \
419 Show_Registers VoidSymbol Scroll_Lock
420 keycode 71 = KP_7 KP_7 Hex_7 \
421 Ascii_7 KP_7 KP_7 \
422 KP_7 KP_7 Hex_7 \
423 Ascii_7 KP_7 KP_7 \
424 KP_7 KP_7 Hex_7 \
425 Ascii_7 KP_7 KP_7
426 keycode 72 = KP_8 KP_8 Hex_8 \
427 Ascii_8 KP_8 KP_8 \
428 KP_8 KP_8 Hex_8 \
429 Ascii_8 KP_8 KP_8 \
430 KP_8 KP_8 Hex_8 \
431 Ascii_8 KP_8 KP_8
432 keycode 73 = KP_9 KP_9 Hex_9 \
433 Ascii_9 KP_9 KP_9 \
434 KP_9 KP_9 Hex_9 \
435 Ascii_9 KP_9 KP_9 \
436 KP_9 KP_9 Hex_9 \
437 Ascii_9 KP_9 KP_9
438 keycode 74 = KP_Subtract
439 keycode 75 = KP_4 KP_4 Hex_4 \
440 Ascii_4 KP_4 KP_4 \
441 KP_4 KP_4 Hex_4 \
442 Ascii_4 KP_4 KP_4 \
443 KP_4 KP_4 Hex_4 \
444 Ascii_4 KP_4 KP_4
445 keycode 76 = KP_5 KP_5 Hex_5 \
446 Ascii_5 KP_5 KP_5 \
447 KP_5 KP_5 Hex_5 \
448 Ascii_5 KP_5 KP_5 \
449 KP_5 KP_5 Hex_5 \
450 Ascii_5 KP_5 KP_5
451 keycode 77 = KP_6 KP_6 Hex_6 \
452 Ascii_6 KP_6 KP_6 \
453 KP_6 KP_6 Hex_6 \
454 Ascii_6 KP_6 KP_6 \
455 KP_6 KP_6 Hex_6 \
456 Ascii_6 KP_6 KP_6
457 keycode 78 = KP_Add
458 keycode 79 = KP_1 KP_1 Hex_1 \
459 Ascii_1 KP_1 KP_1 \
460 KP_1 KP_1 Hex_1 \
461 Ascii_1 KP_1 KP_1 \
462 KP_1 KP_1 Hex_1 \
463 Ascii_1 KP_1 KP_1
464 keycode 80 = KP_2 KP_2 Hex_2 \
465 Ascii_2 KP_2 KP_2 \
466 KP_2 KP_2 Hex_2 \
467 Ascii_2 KP_2 KP_2 \
468 KP_2 KP_2 Hex_2 \
469 Ascii_2 KP_2 KP_2
470 keycode 81 = KP_3 KP_3 Hex_3 \
471 Ascii_3 KP_3 KP_3 \
472 KP_3 KP_3 Hex_3 \
473 Ascii_3 KP_3 KP_3 \
474 KP_3 KP_3 Hex_3 \
475 Ascii_3 KP_3 KP_3
476 keycode 82 = KP_0 KP_0 Hex_0 \
477 Ascii_0 KP_0 KP_0 \
478 KP_0 KP_0 Hex_0 \
479 Ascii_0 KP_0 KP_0 \
480 KP_0 KP_0 Hex_0 \
481 Ascii_0 KP_0 KP_0
482 keycode 83 = KP_Period KP_Period KP_Period \
483 KP_Period KP_Period Boot \
484 KP_Period KP_Period KP_Period \
485 KP_Period KP_Period Boot \
486 KP_Period KP_Period KP_Period \
487 KP_Period KP_Period Boot
488 keycode 84 = Last_Console
489 keycode 85 = VoidSymbol
490 keycode 86 = less greater bar \
491 Meta_less Meta_greater Meta_bar \
492 less greater bar \
493 Meta_less Meta_greater Meta_bar \
494 less greater bar \
495 Meta_less Meta_greater Meta_bar
496 keycode 87 = F11 F23 F35 \
497 Console_11 Console_23 Console_11 \
498 F11 F23 F35 \
499 Console_11 Console_23 Console_11 \
500 F11 F23 F35 \
501 Console_11 Console_23 Console_11
502 keycode 88 = F12 F24 F36 \
503 Console_12 Console_24 Console_12 \
504 F12 F24 F36 \
505 Console_12 Console_24 Console_12 \
506 F12 F24 F36 \
507 Console_12 Console_24 Console_12
508 keycode 89 = VoidSymbol
509 keycode 90 = VoidSymbol
510 keycode 91 = VoidSymbol
511 keycode 92 = VoidSymbol
512 keycode 93 = VoidSymbol
513 keycode 94 = VoidSymbol
514 keycode 95 = VoidSymbol
515 keycode 96 = KP_Enter
516 keycode 97 = Control
517 keycode 98 = KP_Divide KP_Divide Hex_B \
518 KP_Divide KP_Divide KP_Divide \
519 KP_Divide KP_Divide Hex_B \
520 KP_Divide KP_Divide KP_Divide \
521 KP_Divide KP_Divide Hex_B \
522 KP_Divide KP_Divide KP_Divide
523 keycode 99 = Control_backslash Control_backslash Control_backslash \
524 Meta_Control_backslash Meta_Control_backslash Meta_Control_backslash \
525 Control_backslash Control_backslash Control_backslash \
526 Meta_Control_backslash Meta_Control_backslash Meta_Control_backslash \
527 Control_backslash Control_backslash Control_backslash \
528 Meta_Control_backslash Meta_Control_backslash Meta_Control_backslash
529 keycode 100 = Alt
530 keycode 101 = Break
531 keycode 102 = Find
532 keycode 103 = Up Up Up \
533 KeyboardSignal Up Up \
534 Up Up Up \
535 KeyboardSignal Up Up \
536 Up Up Up \
537 KeyboardSignal Up Up
538 keycode 104 = Prior Scroll_Backward Prior \
539 Prior Prior Prior \
540 Prior Scroll_Backward Prior \
541 Prior Prior Prior \
542 Prior Scroll_Backward Prior \
543 Prior Prior Prior
544 keycode 105 = Left Left Left \
545 Decr_Console Left Left \
546 Left Left Left \
547 Decr_Console Left Left \
548 Left Left Left \
549 Decr_Console Left Left
550 keycode 106 = Right Right Right \
551 Incr_Console Right Right \
552 Right Right Right \
553 Incr_Console Right Right \
554 Right Right Right \
555 Incr_Console Right Right
556 keycode 107 = Select
557 keycode 108 = Down
558 keycode 109 = Next Scroll_Forward Next \
559 Next Next Next \
560 Next Scroll_Forward Next \
561 Next Next Next \
562 Next Scroll_Forward Next \
563 Next Next Next
564 keycode 110 = Insert
565 keycode 111 = Remove Remove Remove \
566 Remove Remove Boot \
567 Remove Remove Remove \
568 Remove Remove Boot \
569 Remove Remove Remove \
570 Remove Remove Boot
571 keycode 112 = Macro
572 keycode 113 = F13
573 keycode 114 = F14
574 keycode 115 = Help
575 keycode 116 = Do
576 keycode 117 = F17
577 keycode 118 = KP_MinPlus
578 keycode 119 = Pause
579 keycode 120 = VoidSymbol
580 keycode 121 = VoidSymbol
581 keycode 122 = VoidSymbol
582 keycode 123 = VoidSymbol
583 keycode 124 = VoidSymbol
584 keycode 125 = VoidSymbol
585 keycode 126 = VoidSymbol
586 keycode 127 = VoidSymbol
00 # Russian keyboard layout for Type4/5 Sun keyboards
11 # Written by Alexander V. Lukyanov <lav@yars.free.net>
2 # Version 1.0
2 # Version 1.1
33 #
44 # Uses KOI8-R coding without 'jo'
55 #
0 # Russian keyboard layout for Type4/5 Sun keyboards
1 # Written by Alexander V. Lukyanov <lav@yars.free.net>
2 # Version 1.0
3 #
4 # Uses KOI8-R coding without 'jo'
5 #
6 keymaps 0-6,8,10,12,14
7 keycode 1 =
8 keycode 2 =
9 keycode 3 =
10 keycode 4 =
11 keycode 5 = F1
12 shift keycode 5 = F11
13 alt keycode 5 = Console_1
14 control alt keycode 5 = Console_1
15 altgr shift keycode 5 = F11
16 altgr alt keycode 5 = Console_1
17 altgr control alt keycode 5 = Console_1
18 keycode 6 = F2
19 shift keycode 6 = F12
20 alt keycode 6 = Console_2
21 control alt keycode 6 = Console_2
22 altgr shift keycode 6 = F12
23 altgr alt keycode 6 = Console_2
24 altgr control alt keycode 6 = Console_2
25 keycode 7 = F10
26 shift keycode 7 = F20
27 alt keycode 7 = Console_10
28 control alt keycode 7 = Console_10
29 altgr shift keycode 7 = F20
30 altgr alt keycode 7 = Console_10
31 altgr control alt keycode 7 = Console_10
32 keycode 8 = F3
33 shift keycode 8 = F13
34 alt keycode 8 = Console_3
35 control alt keycode 8 = Console_3
36 altgr shift keycode 8 = F13
37 altgr alt keycode 8 = Console_3
38 altgr control alt keycode 8 = Console_3
39 keycode 9 = F11
40 alt keycode 9 = Console_11
41 control alt keycode 9 = Console_11
42 altgr alt keycode 9 = Console_11
43 altgr control alt keycode 9 = Console_11
44 keycode 10 = F4
45 shift keycode 10 = F14
46 alt keycode 10 = Console_4
47 control alt keycode 10 = Console_4
48 altgr shift keycode 10 = F14
49 altgr alt keycode 10 = Console_4
50 altgr control alt keycode 10 = Console_4
51 keycode 11 = F12
52 alt keycode 11 = Console_12
53 control alt keycode 11 = Console_12
54 altgr alt keycode 11 = Console_12
55 altgr control alt keycode 11 = Console_12
56 keycode 12 = F5
57 shift keycode 12 = F15
58 alt keycode 12 = Console_5
59 control alt keycode 12 = Console_5
60 altgr shift keycode 12 = F15
61 altgr alt keycode 12 = Console_5
62 altgr control alt keycode 12 = Console_5
63 keycode 13 = AltGr_Lock
64 keycode 14 = F6
65 shift keycode 14 = F16
66 alt keycode 14 = Console_6
67 control alt keycode 14 = Console_6
68 altgr shift keycode 14 = F16
69 altgr alt keycode 14 = Console_6
70 altgr control alt keycode 14 = Console_6
71 keycode 15 =
72 keycode 16 = F7
73 shift keycode 16 = F17
74 alt keycode 16 = Console_7
75 control alt keycode 16 = Console_7
76 altgr shift keycode 16 = F17
77 altgr alt keycode 16 = Console_7
78 altgr control alt keycode 16 = Console_7
79 keycode 17 = F8
80 shift keycode 17 = F18
81 alt keycode 17 = Console_8
82 control alt keycode 17 = Console_8
83 altgr shift keycode 17 = F18
84 altgr alt keycode 17 = Console_8
85 altgr control alt keycode 18 = Console_8
86 keycode 18 = F9
87 shift keycode 18 = F19
88 alt keycode 18 = Console_9
89 control alt keycode 18 = Console_9
90 altgr shift keycode 18 = F19
91 altgr alt keycode 18 = Console_9
92 altgr control alt keycode 18 = Console_9
93 keycode 19 = Alt
94 keycode 20 = Up
95 keycode 21 = Pause
96 keycode 22 =
97 keycode 23 = Scroll_Lock Show_Memory Show_Registers Show_State
98 alt keycode 23 = Scroll_Lock
99 keycode 24 = Left
100 alt keycode 24 = Decr_Console
101 altgr alt keycode 24 = Decr_Console
102 keycode 25 =
103 keycode 26 =
104 keycode 27 = Down
105 keycode 28 = Right
106 alt keycode 28 = Incr_Console
107 altgr alt keycode 28 = Incr_Console
108 keycode 29 = Escape
109 alt keycode 29 = Meta_Escape
110 altgr alt keycode 29 = Meta_Escape
111 keycode 30 = one exclam one exclam
112 alt keycode 30 = Meta_one
113 altgr alt keycode 30 = Meta_one
114 keycode 31 = two at two at
115 control keycode 31 = nul
116 alt keycode 31 = Meta_two
117 altgr control keycode 31 = nul
118 altgr alt keycode 31 = Meta_two
119 keycode 32 = three numbersign three numbersign
120 control keycode 32 = Escape
121 alt keycode 32 = Meta_three
122 altgr control keycode 32 = Escape
123 altgr alt keycode 32 = Meta_three
124 keycode 33 = four dollar four dollar
125 control keycode 33 = Control_backslash
126 alt keycode 33 = Meta_four
127 altgr control keycode 33 = Control_backslash
128 altgr alt keycode 33 = Meta_four
129 keycode 34 = five percent five colon
130 control keycode 34 = Control_bracketright
131 alt keycode 34 = Meta_five
132 altgr control keycode 34 = Control_bracketright
133 altgr alt keycode 34 = Meta_five
134 keycode 35 = six asciicircum six comma
135 control keycode 35 = Control_asciicircum
136 alt keycode 35 = Meta_six
137 altgr control keycode 35 = Control_asciicircum
138 altgr alt keycode 35 = Meta_six
139 keycode 36 = seven ampersand seven period
140 control keycode 36 = Control_underscore
141 alt keycode 36 = Meta_seven
142 altgr alt keycode 36 = Meta_seven
143 keycode 37 = eight asterisk eight semicolon
144 control keycode 37 = Delete
145 alt keycode 37 = Meta_eight
146 altgr control keycode 37 = Delete
147 altgr alt keycode 37 = Meta_eight
148 keycode 38 = nine parenleft nine parenleft
149 alt keycode 38 = Meta_nine
150 altgr alt keycode 38 = Meta_nine
151 keycode 39 = zero parenright zero parenright
152 alt keycode 39 = Meta_zero
153 altgr alt keycode 39 = Meta_zero
154 keycode 40 = minus underscore minus underscore
155 control keycode 40 = Control_underscore
156 alt keycode 40 = Meta_minus
157 altgr control keycode 40 = Control_underscore
158 altgr alt keycode 40 = Meta_minus
159 keycode 41 = equal plus equal plus
160 alt keycode 41 = Meta_equal
161 altgr alt keycode 41 = Meta_equal
162 keycode 42 = grave asciitilde grave asciitilde
163 control keycode 42 = nul
164 alt keycode 42 = Meta_grave
165 altgr control keycode 42 = nul
166 altgr alt keycode 42 = Meta_grave
167 keycode 43 = Delete Delete Delete Delete
168 control keycode 43 = BackSpace
169 alt keycode 43 = Meta_Delete
170 altgr control keycode 43 = BackSpace
171 altgr alt keycode 43 = Meta_Delete
172 keycode 44 = Insert
173 keycode 45 = equal
174 keycode 46 = KP_Divide
175 keycode 47 = KP_Multiply
176 keycode 48 =
177 keycode 49 =
178 keycode 50 = KP_Period
179 control alt keycode 50 = Boot
180 altgr control alt keycode 50 = Boot
181 keycode 51 =
182 keycode 52 = Find
183 keycode 53 = Tab Tab
184 alt keycode 53 = Meta_Tab
185 altgr alt keycode 53 = Meta_Tab
186 keycode 54 = q
187 altgr keycode 54 = +0xCA
188 altgr shift keycode 54 = +0xEA
189 keycode 55 = w
190 altgr keycode 55 = +0xC3
191 altgr shift keycode 55 = +0xE3
192 keycode 56 = e
193 altgr keycode 56 = +0xD5
194 altgr shift keycode 56 = +0xF5
195 keycode 57 = r
196 altgr keycode 57 = +0xCB
197 altgr shift keycode 57 = +0xEB
198 keycode 58 = t
199 altgr keycode 58 = +0xC5
200 altgr shift keycode 58 = +0xE5
201 keycode 59 = y
202 altgr keycode 59 = +0xCE
203 altgr shift keycode 59 = +0xEE
204 keycode 60 = u
205 altgr keycode 60 = +0xC7
206 altgr shift keycode 60 = +0xE7
207 keycode 61 = i
208 altgr keycode 61 = +0xDB
209 altgr shift keycode 61 = +0xFB
210 keycode 62 = o
211 altgr keycode 62 = +0xDD
212 altgr shift keycode 62 = +0xFD
213 keycode 63 = p
214 altgr keycode 63 = +0xDA
215 altgr shift keycode 63 = +0xFA
216 keycode 64 = bracketleft braceleft
217 control keycode 64 = Escape
218 alt keycode 64 = Meta_bracketleft
219 altgr control keycode 64 = Escape
220 altgr alt keycode 64 = Meta_bracketleft
221 altgr keycode 64 = +0xC8
222 altgr shift keycode 64 = +0xE8
223 keycode 65 = bracketright braceright
224 control keycode 65 = Control_bracketright
225 alt keycode 65 = Meta_bracketright
226 altgr control keycode 65 = Control_bracketright
227 altgr alt keycode 65 = Meta_bracketright
228 altgr keycode 65 = +0xDF
229 altgr shift keycode 65 = +0xFF
230 keycode 66 = Remove
231 control alt keycode 66 = Boot
232 altgr control alt keycode 66 = Boot
233 keycode 67 =
234 keycode 68 = KP_7
235 alt keycode 68 = Ascii_7
236 altgr alt keycode 68 = Ascii_7
237 keycode 69 = KP_8
238 alt keycode 69 = Ascii_8
239 altgr alt keycode 69 = Ascii_8
240 keycode 70 = KP_9
241 alt keycode 70 = Ascii_9
242 altgr alt keycode 70 = Ascii_9
243 keycode 71 = KP_Subtract
244 keycode 72 =
245 keycode 73 =
246 keycode 74 = Select
247 keycode 75 =
248 keycode 76 = Control
249 keycode 77 = a
250 altgr keycode 77 = +0xC6
251 altgr shift keycode 77 = +0xE6
252 keycode 78 = s
253 altgr keycode 78 = +0xD9
254 altgr shift keycode 78 = +0xF9
255 keycode 79 = d
256 altgr keycode 79 = +0xD7
257 altgr shift keycode 79 = +0xF7
258 keycode 80 = f
259 altgr keycode 80 = +0xC1
260 altgr shift keycode 80 = +0xE1
261 keycode 81 = g
262 altgr keycode 81 = +0xD0
263 altgr shift keycode 81 = +0xF0
264 keycode 82 = h
265 altgr keycode 82 = +0xD2
266 altgr shift keycode 82 = +0xF2
267 keycode 83 = j
268 altgr keycode 83 = +0xCF
269 altgr shift keycode 83 = +0xEF
270 keycode 84 = k
271 altgr keycode 84 = +0xCC
272 altgr shift keycode 84 = +0xEC
273 keycode 85 = l
274 altgr keycode 85 = +0xC4
275 altgr shift keycode 85 = +0xE4
276 keycode 86 = semicolon colon
277 alt keycode 86 = Meta_semicolon
278 altgr alt keycode 86 = Meta_semicolon
279 altgr keycode 86 = +0xD6
280 altgr shift keycode 86 = +0xF6
281 keycode 87 = apostrophe quotedbl
282 control keycode 87 = Control_g
283 alt keycode 87 = Meta_apostrophe
284 altgr control keycode 87 = Control_g
285 altgr alt keycode 87 = Meta_apostrophe
286 altgr keycode 87 = +0xDC
287 altgr shift keycode 87 = +0xFC
288 keycode 88 = backslash bar backslash bar
289 control keycode 88 = Control_backslash
290 alt keycode 88 = Meta_backslash
291 altgr control keycode 88 = Control_backslash
292 altgr alt keycode 88 = Meta_backslash
293 keycode 89 = Return
294 alt keycode 89 = Meta_Control_m
295 altgr alt keycode 89 = Meta_Control_m
296 keycode 90 = KP_Enter
297 keycode 91 = KP_4
298 alt keycode 91 = Ascii_4
299 altgr alt keycode 91 = Ascii_4
300 keycode 92 = KP_5
301 alt keycode 92 = Ascii_5
302 altgr alt keycode 92 = Ascii_5
303 keycode 93 = KP_6
304 alt keycode 93 = Ascii_6
305 altgr alt keycode 93 = Ascii_6
306 keycode 94 = KP_0
307 alt keycode 94 = Ascii_0
308 altgr alt keycode 94 = Ascii_0
309 keycode 95 =
310 keycode 96 = Prior
311 shift keycode 96 = Scroll_Backward
312 altgr shift keycode 96 = Scroll_Backward
313 keycode 97 =
314 keycode 98 = Num_Lock
315 keycode 99 = Shift
316 keycode 100 = z
317 altgr keycode 100 = +0xD1
318 altgr shift keycode 100 = +0xF1
319 keycode 101 = x
320 altgr keycode 101 = +0xDE
321 altgr shift keycode 101 = +0xFE
322 keycode 102 = c
323 altgr keycode 102 = +0xD3
324 altgr shift keycode 102 = +0xF3
325 keycode 103 = v
326 altgr keycode 103 = +0xCD
327 altgr shift keycode 103 = +0xED
328 keycode 104 = b
329 altgr keycode 104 = +0xC9
330 altgr shift keycode 104 = +0xE9
331 keycode 105 = n
332 altgr keycode 105 = +0xD4
333 altgr shift keycode 105 = +0xF4
334 keycode 106 = m
335 altgr keycode 106 = +0xD8
336 altgr shift keycode 106 = +0xF8
337 keycode 107 = comma less
338 alt keycode 107 = Meta_comma
339 altgr alt keycode 107 = Meta_comma
340 altgr keycode 107 = +0xC2
341 altgr shift keycode 107 = +0xE2
342 keycode 108 = period greater
343 # control keycode 108 = Compose
344 alt keycode 108 = Meta_period
345 altgr alt keycode 108 = Meta_period
346 altgr keycode 108 = +0xC0
347 altgr shift keycode 108 = +0xE0
348 keycode 109 = slash question slash question
349 control keycode 109 = Delete
350 alt keycode 109 = Meta_slash
351 altgr control keycode 109 = Delete
352 altgr alt keycode 109 = Meta_slash
353 keycode 110 = Shift
354 keycode 111 = Linefeed
355 keycode 112 = KP_1
356 alt keycode 112 = Ascii_1
357 altgr alt keycode 112 = Ascii_1
358 keycode 113 = KP_2
359 alt keycode 113 = Ascii_2
360 altgr alt keycode 113 = Ascii_2
361 keycode 114 = KP_3
362 alt keycode 114 = Ascii_3
363 altgr alt keycode 114 = Ascii_3
364 keycode 115 =
365 keycode 116 =
366 keycode 117 =
367 keycode 118 = Help
368 keycode 119 = Caps_Lock
369 keycode 120 =
370 keycode 121 = space
371 control keycode 121 = nul
372 alt keycode 121 = Meta_space
373 altgr control keycode 121 = nul
374 altgr alt keycode 121 = Meta_space
375 keycode 122 =
376 keycode 123 = Next
377 shift keycode 123 = Scroll_Forward
378 altgr shift keycode 123 = Scroll_Forward
379 keycode 124 =
380 keycode 125 = KP_Add
381 keycode 126 =
382 keycode 127 =
00 # fontpositions 0-95: positions 160-255 in ISO 8859-7 (Greek)
11 0x000 U+00A0 # NO-BREAK SPACE
2 0x001 U+2018 # LEFT SINGLE QUOTATION MARK
3 0x002 U+2019 # RIGHT SINGLE QUOTATION MARK
2 0x001 U+2018 U+02BD # LEFT SINGLE QUOTATION MARK
3 0x002 U+2019 U+02BC # RIGHT SINGLE QUOTATION MARK
44 0x003 U+00A3 # POUND SIGN
55 0x006 U+00A6 # BROKEN BAR
66 0x007 U+00A7 # SECTION SIGN
2626 simultaneously, and keycode 99 otherwise; the latter has keycode
2727 101 when Ctrl is pressed simultaneously, and keycode 119 otherwise.
2828 (Thus, it makes no sense to bind functions to Alt keycode 99 or
29 Ctrl keycode 119.)
29 Ctrl keycode 119.) The Pause/Break key is also special in another way:
30 it does not generate key-up scancodes, but generates the entire
31 6-scancode sequence on key-down.
3032 <P>If you have strange keys, that do not generate any code under Linux
3133 (or generate messages like "unrecognized scancode"), and your kernel
3234 is 1.1.63 or later, then you can use setkeycodes(1) to tell the kernel
33 about them. They won't work under X, however.
34 Once they have gotten a keycode from <CODE>setkeycodes</CODE>, they can be assigned
35 a function by <CODE>loadkeys</CODE>.
35 about them. Once they have gotten a keycode from <CODE>setkeycodes</CODE>,
36 they can be assigned a function by <CODE>loadkeys</CODE>.
37 <P>For example, using <CODE>showkey -s</CODE> one sees that Microsoft keyboards
38 use the scancode sequences (in hexadecimal) e0 5b (left Windows key),
39 e0 5c (right Windows key), e0 5d (Menu key).
40 Microsoft Internet keyboard also uses e0 6a (Back), e0 69 (Forward),
41 e0 68 (Stop), e0 6c (Mail), e0 65 (Search), e0 66 (Favorites),
42 e0 32 (Web/Home), e0 6b (My Computer), e0 21 (Calculator), e0 5f (Sleep).
43 Use <CODE>dumpkeys</CODE> to see what keycodes are still unused.
44 Typically values like 89-95 and 112-118 and 120-127 are free.
45 Now
46 <BLOCKQUOTE><CODE>
47 <PRE>
48 % setkeycodes e05b 125
49 % setkeycodes e05c 126
50 % setkeycodes e05d 127
51 </PRE>
52 </CODE></BLOCKQUOTE>
53
54 assigns keycodes to these scancode sequences, and
55 <BLOCKQUOTE><CODE>
56 <PRE>
57 % loadkeys
58 keycode 125 = Decr_Console
59 keycode 126 = Incr_Console
60 keycode 127 = KeyboardSignal
61 %
62 </PRE>
63 </CODE></BLOCKQUOTE>
64
65 would make these Windows keys go to the previous or next virtual console,
66 and let the Menu key create a fresh virtual console (in case you have
67 something like <CODE>spawn_console</CODE> running).
3668 <P>
3769 <HR>
3870 <A HREF="kbd.FAQ-15.html">Next</A>
13691369 simultaneously, and keycode 99 otherwise; the latter has keycode
13701370 101 when Ctrl is pressed simultaneously, and keycode 119 otherwise.
13711371 (Thus, it makes no sense to bind functions to Alt keycode 99 or
1372 Ctrl keycode 119.)
1372 Ctrl keycode 119.) The Pause/Break key is also special in another way:
1373 it does not generate key-up scancodes, but generates the entire
1374 6-scancode sequence on key-down.
13731375
13741376 If you have strange keys, that do not generate any code under Linux
13751377 (or generate messages like "unrecognized scancode"), and your kernel
13761378 is 1.1.63 or later, then you can use setkeycodes(1) to tell the kernel
1377 about them. They won't work under X, however.
1378 Once they have gotten a keycode from <tt/setkeycodes/, they can be assigned
1379 a function by <tt/loadkeys/.
1379 about them. Once they have gotten a keycode from <tt/setkeycodes/,
1380 they can be assigned a function by <tt/loadkeys/.
1381
1382 For example, using <tt/showkey -s/ one sees that Microsoft keyboards
1383 use the scancode sequences (in hexadecimal) e0 5b (left Windows key),
1384 e0 5c (right Windows key), e0 5d (Menu key).
1385 Microsoft Internet keyboard also uses e0 6a (Back), e0 69 (Forward),
1386 e0 68 (Stop), e0 6c (Mail), e0 65 (Search), e0 66 (Favorites),
1387 e0 32 (Web/Home), e0 6b (My Computer), e0 21 (Calculator), e0 5f (Sleep).
1388 Use <tt>dumpkeys</tt> to see what keycodes are still unused.
1389 Typically values like 89-95 and 112-118 and 120-127 are free.
1390 Now
1391 <tscreen><verb>
1392 % setkeycodes e05b 125
1393 % setkeycodes e05c 126
1394 % setkeycodes e05d 127
1395 </verb></tscreen>
1396 assigns keycodes to these scancode sequences, and
1397 <tscreen><verb>
1398 % loadkeys
1399 keycode 125 = Decr_Console
1400 keycode 126 = Incr_Console
1401 keycode 127 = KeyboardSignal
1402 %
1403 </verb></tscreen>
1404 would make these Windows keys go to the previous or next virtual console,
1405 and let the Menu key create a fresh virtual console (in case you have
1406 something like <tt/spawn_console/ running).
13801407
13811408 <sect>Examples of use of loadkeys and xmodmap<p>
13821409 <nidx>loadkeys!example using</nidx>
0 From: johnsonm@stolaf.edu (Michael K. Johnson)
1 Subject: changing keyboard repeat rate.
2
3 OK, I have gotten several requests for info on how to change the
4 keyboard repeat rate, so here goes. Note: I can't just give diffs,
5 because there are lots of options, and for heaven's sake it's only
6 three lines of code.
7
8 In boot/setup.S, there are the lines:
9
10 ! set the keyboard repeat rate to the max
11
12 mov ax,#0x0305
13 mov bx,0x0000
14 int 0x16
15
16 If you don't want to change the repeat rate at all, just comment out
17 these lines by prefacing them with !'s. If you want something in the
18 middle, change the
19 mov bx,0x0000
20 to mov bx,0x????
21 where ???? is determined by (from Ralf Brown's interrupt list)
22 bh = delay value (0x00 = 250 ms to 0x03 = 1000 ms (one second))
23 this is the delay before the repeat starts happening
24 bl = repeat rate (0x00 = 30/sec to 0x0c = 10/sec [default] to 0x1f = 2/sec)
25
26 I use mov bx,0x0006
27 to delay 1/4 sec, then repeat at what I think is a comfortable rate.
28 I am too lazy to calculate the exact speed -- maybe 20/sec? ;-)
29
30 Hope this helps people.
31
32 michaelkjohnson
33 johnsonm@stolaf.edu
0 Date: Wed, 21 Jul 1999 23:34:05 -0700
1 From: Marc Merlin <marc_news@merlins.org>
2 Cc: linux-kernel@vger.rutgers.edu, Larry Augustin <lma@valinux.com>
3
4 There is an issue with setup.S:
5 ! Set the keyboard repeat rate to the max
6 mov ax,#0x0305
7 xor bx,bx ! clear bx
8 int 0x16
9
10 Those lines are not really needed but they cause a problem on some (very
11 few) systems where every other boot (or so) the keyboard won't be found (and
12 has to be plugged/unplugged before it re-appears).
13 It happens to affect some of the Pentium Pro systems that VA Linux Systems
14 used to sell.
15 Larry Augustin (CEO VA) found that removing those three lines fixes the
16 problem and VA has been shipping kernels with them disabled for at least two
17 years without any adverse effects.
18 The patch actually got in the 2.0.31pre series (by David Miller) but got
19 dropped/lost when David gave up.
20
21 More details from Larry:
22
23 ----- Forwarded message from Larry Augustin <lma@valinux.com> -----
24 From: Larry Augustin <lma@valinux.com>
25
26 Specifically, we had the problem on Intel Venus (VS440FX) Pentium Pro
27 systems. I have a feeling the problem could be traced to a Keytronic
28 keyboard BIOS bug, but I never tracked it down.
29
30 Interesting enough, that was one of the patches david miller had in the code
31 base that got dropped when he quit doing 2.0 maintenance releases.
32
33 Larry
0 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
1 <HTML>
2 <HEAD>
3 <META NAME="GENERATOR" CONTENT="SGML-Tools 1.0.9">
4 <TITLE>Keyboard scancodes: Ordinary PC keyboards</TITLE>
5 <LINK HREF="scancodes-2.html" REL=next>
6
7 <LINK HREF="scancodes.html#toc1" REL=contents>
8 </HEAD>
9 <BODY>
10 <A HREF="scancodes-2.html">Next</A>
11 Previous
12 <A HREF="scancodes.html#toc1">Contents</A>
13 <HR>
14 <H2><A NAME="s1">1. Ordinary PC keyboards</A></H2>
15
16 <P>The data from a keyboard comes mainly in the form of scancodes,
17 produced by key presses or used in the protocol with the computer.
18 (Different codes are used by the keyboard firmware internally,
19 and there also exist several
20 <A HREF="#scancode_modes">sets of scancodes</A>. Here, for the
21 time being, we only give the default codes - those from scancode set 2.)
22 Each key press and key release produces between 0 and 6 scancodes.
23 <P>
24 <H2><A NAME="ss1.1">1.1 Key release</A>
25 </H2>
26
27 <P>Below I'll only mention the scancode for key press (`make').
28 The scancode for key release (`break') is obtained from it
29 by setting the high order bit (adding 0x80 = 128).
30 Thus, Esc press produces scancode <B>01</B>, Esc release
31 scancode <B>81</B> (hex).
32 For sequences things are similar: Keypad-/ gives <B>e0</B> <B>35</B>
33 when pressed, <B>e0</B> <B>b5</B> when released. Most keyboards will
34 repeat the make code (key down code) when the key repeats. Some will also
35 fake Shift down and Shift up events during the repeat.
36 <P>The keys PrtSc/SysRq and Pause/Break are special.
37 The former produces scancode <B>e0</B> <B>2a</B> <B>e0</B> <B>37</B>
38 when no modifier key is pressed simultaneously, <B>e0</B> <B>37</B>
39 together with Shift or Ctrl, but <B>54</B> together with (left or right) Alt.
40 The latter produces scancode sequence
41 <B>e1</B> <B>1d</B> <B>45</B> <B>e1</B> <B>9d</B> <B>c5</B>
42 when pressed (without modifier) and nothing at all upon release.
43 However, together with (left or right) Ctrl, one gets
44 <B>e0</B> <B>46</B> <B>e0</B> <B>c6</B>,
45 and again nothing at release. It does not repeat.
46 <P>
47 <P>
48 <H2><A NAME="ss1.2">1.2 Protocol scancodes</A>
49 </H2>
50
51 <P>Most scancodes indicate a key press or release.
52 Some are used in the communication protocol.
53 <P><B>00</B> (Keyboard buffer overflow or parity error)
54 <P><B>aa</B> (BAT [Basic Assurance Test] OK)
55 <P><B>ee</B> (Result of echo command)
56 <P><B>f1</B> (Some keyboards, as reply to command <B>a4</B>:
57 Password not installed)
58 <P><B>fa</B> (Ack)
59 <P><B>fc</B> (BAT error or Mouse transmit error)
60 <P><B>fe</B> (Keyboard fails to ack, please resend)
61 <P><B>ff</B> (Keyboard parity error)
62 <P>
63 <H2><A NAME="ss1.3">1.3 Escape scancodes</A>
64 </H2>
65
66 <P>The codes <B>e0</B> and <B>e1</B> introduce scancode sequences,
67 and are not usually used as isolated scancodes themselves
68 (but see
69 <A HREF="scancodes-2.html#e0_as_key">below</A>).
70 <P>This, and the above, means that scancodes
71 <B>00</B>, <B>60</B>, <B>61</B>, <B>6e</B>, <B>71</B>,
72 <B>7a</B>, <B>7c</B>, <B>7e</B>, <B>7f</B>
73 are unavailable to signify key presses (on a default keyboard;
74 we'll see keyboards that actually use scancode <B>60</B>).
75 <P>Also other prefixes occur, see
76 <A HREF="scancodes-2.html#prefix_80">below</A>.
77 <P>
78 <H2><A NAME="ss1.4">1.4 Ordinary scancodes</A>
79 </H2>
80
81 <P>The scancodes in scancode set 2 are given in hex.
82 Between parentheses the keycap on a US keyboard.
83 The scancodes are given in order, grouped according
84 to groups of keys that are usually found next to each other.
85 <P><B>00</B> is normally an error code
86 <P><B>01</B> (Esc)
87 <P><B>02</B> (1!), <B>03</B> (2@), <B>04</B> (3#), <B>05</B> (4$),
88 <B>06</B> (5%E), <B>07</B> (6^), <B>08</B> (7&amp;),
89 <B>09</B> (8*), <B>0a</B> (9(), <B>0b</B> (0)), <B>0c</B> (-_),
90 <B>0d</B> (=+), <B>0e</B> (Backspace)
91 <P><B>0f</B> (Tab), <B>10</B> (Q), <B>11</B> (W), <B>12</B> (E),
92 <B>13</B> (R), <B>14</B> (T), <B>15</B> (Y),
93 <B>16</B> (U), <B>17</B> (I), <B>18</B> (O),
94 <B>19</B> (P), <B>1a</B> ([{), <B>1b</B> (]})
95 <P><B>1c</B> (Enter)
96 <P><B>1d</B> (LCtrl)
97 <P><B>1e</B> (A), <B>1f</B> (S), <B>20</B> (D), <B>21</B> (F),
98 <B>22</B> (G), <B>23</B> (H), <B>24</B> (J), <B>25</B> (K),
99 <B>26</B> (L), <B>27</B> (;:), <B>28</B> ('")
100 <P><B>29</B> (`~)
101 <P><B>2a</B> (LShift)
102 <P><B>2b</B> (\|), on a 102-key keyboard
103 <P><B>2c</B> (Z), <B>2d</B> (X), <B>2e</B> (C), <B>2f</B> (V),
104 <B>30</B> (B), <B>31</B> (N), <B>32</B> (M), <B>33</B> (,&lt;),
105 <B>34</B> (.&gt;), <B>35</B> (/?), <B>36</B> (RShift)
106 <P><B>37</B> (Keypad-*) or (*/PrtScn) on a 83/84-key keyboard
107 <P><B>38</B> (LAlt), <B>39</B> (Space bar),
108 <P><B>3a</B> (CapsLock)
109 <P><B>3b</B> (F1), <B>3c</B> (F2), <B>3d</B> (F3), <B>3e</B> (F4),
110 <B>3f</B> (F5), <B>40</B> (F6), <B>41</B> (F7),
111 <B>42</B> (F8), <B>43</B> (F9), <B>44</B> (F10)
112 <P><B>45</B> (NumLock)
113 <P><B>46</B> (ScrollLock)
114 <P><B>47</B> (Keypad-7/Home), <B>48</B> (Keypad-8/Up),
115 <B>49</B> (Keypad-9/PgUp)
116 <P><B>4a</B> (Keypad--)
117 <P><B>4b</B> (Keypad-4/Left), <B>4c</B> (Keypad-5),
118 <B>4d</B> (Keypad-6/Right), <B>4e</B> (Keypad-+)
119 <P><B>4f</B> (Keypad-1/End), <B>50</B> (Keypad-2/Down),
120 <B>51</B> (Keypad-3/PgDn)
121 <P><B>52</B> (Keypad-0/Ins), <B>53</B> (Keypad-./Del)
122 <P><B>54</B> (Alt-SysRq) on a 84+ key keyboard
123 <P><B>55</B> is less common; occurs as PF1 on a Focus 9000 keyboard,
124 and as FN on an IBM ThinkPad.
125 <P><B>56</B> mostly on non-US keyboards. It is an unlabelled key
126 next to the space bar on a Toshiba notebook.
127 <P><B>57</B> (F11), <B>58</B> (F12) both on a 101+ key keyboard
128 <P><B>59</B>-<B>5a</B>-...-<B>7f</B> are less common.
129 Scancodes <B>59</B>-<B>5c</B> occur on the RC930 keyboard.
130 X calls <B>5d</B> `KEY_Begin'.
131 Scancodes <B>55</B>, <B>6d</B>, <B>6f</B>, <B>73</B>, <B>74</B>,
132 <B>77</B>, <B>78</B>, <B>79</B>, <B>7a</B>, <B>7b</B>,
133 <B>7c</B>, <B>7e</B> occur on the Focus 9000 keyboard.
134 Scancodes <B>73</B>, <B>7d</B> occur on a Japanese 86/106 keyboard.
135 <P>
136 <P>
137 <H2><A NAME="ss1.5">1.5 Escaped scancodes</A>
138 </H2>
139
140 <P>Apart from the Pause/Break key that has an escaped sequence starting
141 with <B>e1</B>, the escape used is <B>e0</B>. Often, the codes
142 are chosen in such a way that something meaningful happens when
143 the receiver just discards the <B>e0</B>.
144 <P><B>e0</B> <B>1c</B> (Keypad Enter) - <B>1c</B> (Enter)
145 <P><B>e0</B> <B>1d</B> (RCtrl) - <B>1d</B> (LCtrl)
146 <P><B>e0</B> <B>2a</B> (fake LShift) - <B>2a</B> (LShift)
147 <P><B>e0</B> <B>35</B> (Keypad-/) - <B>35</B> (/?)
148 <P><B>e0</B> <B>36</B> (fake RShift) - <B>36</B> (RShift)
149 <P><B>e0</B> <B>37</B> (Ctrl-PrtScn) - <B>37</B> (*/PrtScn)
150 <P><B>e0</B> <B>38</B> (RAlt) - <B>38</B> (LAlt)
151 <P><B>e0</B> <B>46</B> (Ctrl-Break) - <B>46</B> (ScrollLock)
152 <P><B>e0</B> <B>47</B> (Grey Home) - <B>47</B> (Keypad-7/Home)
153 <P><B>e0</B> <B>48</B> (Grey Up) - <B>48</B> (Keypad-8/UpArrow)
154 <P><B>e0</B> <B>49</B> (Grey PgUp) - <B>49</B> (Keypad-9/PgUp)
155 <P><B>e0</B> <B>4b</B> (Grey Left) - <B>4b</B> (Keypad-4/Left)
156 <P><B>e0</B> <B>4d</B> (Grey Right) - <B>4d</B> (Keypad-6/Right)
157 <P><B>e0</B> <B>4f</B> (Grey End) - <B>4f</B> (Keypad-1/End)
158 <P><B>e0</B> <B>50</B> (Grey Down) - <B>50</B> (Keypad-2/DownArrow)
159 <P><B>e0</B> <B>51</B> (Grey PgDn) - <B>51</B> (Keypad-3/PgDn)
160 <P><B>e0</B> <B>52</B> (Grey Insert) - <B>52</B> (Keypad-0/Ins)
161 <P><B>e0</B> <B>53</B> (Grey Delete) - <B>53</B> (Keypad-./Del)
162 <P>These escaped scancodes occur only on 101+ key keyboards.
163 <P>
164 <H2><A NAME="ss1.6">1.6 Fake shifts</A>
165 </H2>
166
167 <P>The ten grey keys Insert, Home, PgUp, Delete, End, PgDn,
168 Up, Left, Down, Right are supposed to function regardless
169 of the state of Shift and NumLock keys. But for an old AT keyboard
170 the keypad keys would produce digits when Numlock was on or Shift
171 was down. Therefore, in order to fool old programs,
172 fake scancodes are sent: when LShift is down, and Insert is
173 pressed, <B>e0</B> <B>aa</B> <B>e0</B> <B>52</B> is sent;
174 upon release of Insert <B>e0</B> <B>d2</B> <B>e0</B> <B>2a</B>
175 is sent. In other words, a fake LShift-up and
176 fake LShift-down are inserted.
177 <P>If the Shift key is released earlier than the repeated key,
178 then a real Shift-up code occurs (without preceding fake Shift-down)
179 so that a program ignoring <B>e0</B> would see one more Shift-up
180 than Shift-down.
181 <P>When NumLock is on, no fake Shifts are sent when Shift was down,
182 but fake Shifts are sent when Shift was not down. Thus,
183 with Numlock, if Insert is pressed,
184 <B>e0</B> <B>2a</B> <B>e0</B> <B>52</B> is sent
185 and upon release <B>e0</B> <B>d2</B> <B>e0</B> <B>aa</B> is sent.
186 The keyboard maintains a private NumLock mode, toggled when
187 NumLock is pressed, and set when the NumLock LED is set.
188 <P>In the same way, when Shift is down, the Grey-/ key produces
189 fake Shift-up and fake Shift-down sequences. However, it does
190 not react to the state of NumLock. The purpose of course is to
191 fool programs that identify Grey-/ with ordinary /, so that they
192 don't treat Shift-Grey-/ like Shift-/, i.e., ?.
193 <P>On a Toshiba notebook, the three Windows keys are treated like
194 the group of ten keys mentioned, and get fake shifts when
195 (left or right) Shift is down. Thet do not react to NumLock.
196 <P>
197 <H2><A NAME="ss1.7">1.7 Turbo Mode</A>
198 </H2>
199
200 <P>On some motherboards the LCtrl-LAlt-GreyPlus and LCtrl-LAlt-GreyMinus
201 switch Turbo mode on/off, respectively. For these, the motherboard
202 may generate the same scancode sequence when the Turbo button is
203 pushed: Turbo Switch (High->Low):
204 <B>1d</B> <B>38</B> <B>4a</B> <B>ce</B> <B>b8</B> <B>9d</B>
205 and Turbo Switch (Low->High):
206 <B>1d</B> <B>38</B> <B>4e</B> <B>ce</B> <B>b8</B> <B>9d</B>.
207 <P>Other peculiar combinations in this style include
208 LCtrl-LAlt-LShift-GreyMinus to turn off system cache.
209 <P>Thio Yu Jin &lt;jin@singmail.com&gt; complains that on his Toshiba 4010CDS
210 the Ctrl-Alt-Shift-T key combination brings up the Toshiba user manual.
211 (04 Mar 1999 - not April 1.)
212 <P>
213 <P>
214 <H2><A NAME="scancode_modes"></A> <A NAME="ss1.8">1.8 Scancode modes</A>
215 </H2>
216
217 <P>The usual PC keyboards are capable of producing three
218 sets of scancodes. Writing 0xf0 followed by 1, 2 or 3 to port
219 0x60 will put the keyboard in scancode mode 1, 2 or 3. Writing
220 0xf0 followed by 0 queries the mode, resulting in a scancode
221 byte 0x43, 0x41 or 0x3f from the keyboard.
222 <P>Scancode mode 2 is the default. In this mode, a key press
223 usually produces a value <I>s</I> in the range 0x01-0x5f and the
224 corresponding key release produces <I>s</I>+0x80. In scancode
225 mode 3, the only key releases that produce a scan code are of
226 either Shift key, or of the left Ctrl and Alt keys; for all
227 other keys only the key presses are noted. The produced
228 scancodes are mostly equal to those for scancode mode 2.
229 <P>In scancode mode 1 most key releases produce the same values as
230 in scancode mode 2, but for key presses there are entirely
231 different, unrelated values. The details are somewhat messy.
232 <P>
233 <HR>
234 <A HREF="scancodes-2.html">Next</A>
235 Previous
236 <A HREF="scancodes.html#toc1">Contents</A>
237 </BODY>
238 </HTML>
0 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
1 <HTML>
2 <HEAD>
3 <META NAME="GENERATOR" CONTENT="SGML-Tools 1.0.9">
4 <TITLE>Keyboard scancodes: Special keyboards</TITLE>
5 <LINK HREF="scancodes-3.html" REL=next>
6 <LINK HREF="scancodes-1.html" REL=previous>
7 <LINK HREF="scancodes.html#toc2" REL=contents>
8 </HEAD>
9 <BODY>
10 <A HREF="scancodes-3.html">Next</A>
11 <A HREF="scancodes-1.html">Previous</A>
12 <A HREF="scancodes.html#toc2">Contents</A>
13 <HR>
14 <H2><A NAME="s2">2. Special keyboards</A></H2>
15
16 <P>
17 <P>
18 <H2><A NAME="ss2.1">2.1 Focus KeyPro FK-9000 keyboard</A>
19 </H2>
20
21 <P>Raul D. Miller &lt;rockwell@nova.umd.edu&gt;
22 and &lt;hagmanti@cps.msu.edu&gt; report:
23 <P><I>The keyboard is a KeyPro FK-9000. The FCC label says it's made in
24 Taiwan by Focus Electronic Co, Ltd. It has a built-in calculator.</I>
25 <P><I>This keyboard has twelve additional keys, with scancodes</I>
26 <B>55</B> (PF1),
27 <B>6d</B> (PF11),
28 <B>6f</B> (PF12),
29 <B>73</B> (PF2),
30 <B>74</B> (PF9),
31 <B>77</B> (PF3),
32 <B>78</B> (PF4),
33 <B>79</B> (PF5),
34 <B>7a</B>* (PF6),
35 <B>7b</B> (PF7),
36 <B>7c</B> (PF8),
37 <B>7e</B>* (PF10).
38 <P><I>The break codes equal the make codes ORed with 0x80, as always,
39 but the Linux kernel eats <B>fa</B> and <B>fe</B> as
40 protocol bytes.</I>
41 <P><I>The behavior of these keys is different from that of normal keys--
42 they generate nothing when pressed; then generate the above scancodes
43 at the normal repeat time and rate, and then generate (except for the
44 starred ones) their scancode ORed with 0x80 when released...</I>
45 <P><I>These PF keys are reprogrammable -- and programming occurs as a sequence
46 of keyboard actions. Therefore, the PF keys duplicate whatever
47 keyboard actions occurred during their programming.
48 You hit the "Prog" key, then the PF key you want to program; type the
49 string you want to store in the key (it's limited to 14 keypresses),
50 and then hit the PF key again. After that, when you hit the PF key,
51 it sends the string, and generates its own abnormal scancode upon
52 release. When the key is held down, it generates the scancode repeatedly,
53 but does not generate the string stored in it repeatedly.</I>
54 <P><I>When you go to program a key, the scancodes for "PF##-" are sent
55 to the computer, then the scancodes for each key you hit as you
56 hit it (the shift, etc. keys are an exception-- they send "s-"
57 and such :), and then, when you hit the PF## key again to end the
58 programming, it sends a sequence of (at least) 18 "0e 8e"s --
59 Backspaces...</I>
60 <P><I>The program key itself doesn't generate a scancode at any time.
61 The same applies to the CE and AC/ON keys (part of the calculator).
62 There is a switch to change between calculator and keyboard mode
63 which generates no scancodes.</I>
64 <P><I>When the keyboard is in calculator mode, the entire numeric
65 keypad (and everything else on the right side) generates no
66 scancodes.</I>
67 <P><I>When the keyboard is not in caluclator mode, the %, MC, MR, M-,
68 M+, and Square Root keys all generate 0xff when pressed,
69 0xff to repeat, and 0xff on release.</I>
70 <P><I>The little unlabeled key between the right Ctrl and right Alt
71 generates <B>56</B> when hit, repeats that, and then <B>d6</B>
72 when released, just like a normal key.</I>
73 <P>
74 <P>
75 <H2><A NAME="ss2.2">2.2 BTC keyboard</A>
76 </H2>
77
78 <P>This keyboard has one additional key, with escaped scancode
79 <B>e0</B> <B>6f</B> (Macro).
80 <P>
81 <H2><A NAME="ss2.3">2.3 LK450 keyboard</A>
82 </H2>
83
84 <P>This keyboard has six additional keys, with escaped scancodes
85 <B>e0</B> <B>3d</B> (F13),
86 <B>e0</B> <B>3e</B> (F14),
87 <B>e0</B> <B>3f</B> (Help),
88 <B>e0</B> <B>40</B> (Do),
89 <B>e0</B> <B>41</B> (F17),
90 <B>e0</B> <B>4e</B> (Keypad-minplus).
91 <P>
92 <H2><A NAME="ss2.4">2.4 OmniKey keyboard</A>
93 </H2>
94
95 <P>This keyboard has one additional key, with escaped scancode
96 <B>e0</B> <B>4c</B> (Omni).
97 <P>
98 <H2><A NAME="ss2.5">2.5 GRiD 2260 keyboard</A>
99 </H2>
100
101 <P>The GRiD 2260 notebook has a key producing the
102 <B>6c</B> scancode; I do not know the keycap.
103 <P>
104 <H2><A NAME="ss2.6">2.6 A Japanese 86/106 keyboard</A>
105 </H2>
106
107 <P>Barry Yip &lt;g609296@cc.win.or.jp&gt; reports:
108 <P><I>This keyboard has two additional keys, with scancodes
109 <B>73</B> (\-) and <B>7d</B> (\|).
110 This kind of keyboard is rather standard in Japan. They are called 106
111 keyboard. Mine is a notebook so it is 86 keyboard. No specific brand
112 name.</I>
113 <P>
114 <H2><A NAME="ss2.7">2.7 Brazilian keyboard</A>
115 </H2>
116
117 <P>Arnaldo Moura &lt;lumbago@vnet.ibm.com&gt; reports:
118 <P><I>This keyboard has two unusual keys, with scancodes
119 <B>73</B> (/?) and <B>7e</B> (Keypad-.).</I>
120 <P>Also others mention an ABNT keyboard with <B>73</B> and
121 <B>7e</B> keys, mostly because these keys do not function
122 with Windows NT 4.0.
123 <P>ABNT (Associação Brasileira de Normas Tecnicas) and ABNT2
124 are Brazilian keyboard layout standards. The plain Brazilian
125 keyboard has 103 keys. I find an ABNT 107 key keyboard announced by
126 <A HREF="http://www.gertec.com.br/tecpc1.htm">gertec</A>.
127 with Suspend / Wake-up / Power power management keys.
128 <I>For enabling these functions, run BIOS setup.</I>
129 <P>
130 <H2><A NAME="ss2.8">2.8 RC930 keyboard</A>
131 </H2>
132
133 <P>Torben Fjerdingstad &lt;tfj@olivia.ping.dk&gt; reports:
134 <P><I>It's an rc930 keyboard, from Regnecentralen/RC International, Now ICL.
135 This keyboard has four additional keys, with scancodes</I>
136 <B>59</B> (A1),
137 <B>5a</B> (A2),
138 <B>5b</B> (A3),
139 <B>5c</B> (A4).
140 <P><I>The rc930/rc931 keyboards are not made anymore, because they had a
141 problem with fast typists, writing over 400 chars/minute.
142 Writing 'af&lt;space&gt;', very, very fast, did a PgUp.</I>
143 <P>
144 <H2><A NAME="prefix_80"></A> <A NAME="ss2.9">2.9 Tandberg Data keyboard</A>
145 </H2>
146
147 <P>Kjetil Torgrim Homme &lt;kjetilho@ifi.uio.no&gt; reports:
148 <P><I>My Tandberg Data keyboard uses the prefix <B>80</B> for
149 its numerous (20) extra keys. The <B>80</B> scancodes are:</I>
150 <P><B>11</B>, <B>12</B>, <B>13</B>, <B>14</B>, <B>16</B>,
151 <B>17</B>, <B>18</B>, <B>19</B>, <B>1e</B>, <B>1f</B>,
152 <B>20</B>, <B>21</B>, <B>22</B>, <B>23</B>, <B>25</B>,
153 <B>26</B>, <B>2f</B>, <B>30</B>, <B>32</B>, <B>56</B>.
154 <P><I>For completeness, the <B>e0</B> scancodes:</I>
155 <P><B>1c</B>, <B>2a</B>, <B>35</B>, <B>37</B>, <B>47</B>,
156 <B>48</B>, <B>49</B>, <B>4b</B>, <B>4d</B>, <B>4f</B>,
157 <B>50</B>, <B>51</B>, <B>52</B>, <B>53</B>.
158 <P><I>The <B>e1</B> scancode: <B>1d</B>.
159 As you can see, there is no overlap on this keyboard.</I>
160 <P>
161 <H2><A NAME="ss2.10">2.10 A keyboard</A>
162 </H2>
163
164 <P><I>Three unusual power keys: <B>e0</B> <B>5e</B>,
165 <B>e0</B> <B>5f</B>, <B>e0</B> <B>63</B>.</I>
166 <P>
167 <H2><A NAME="ss2.11">2.11 Microsoft Natural keyboard</A>
168 </H2>
169
170 <P>This keyboard has three additional keys, with escaped scancodes
171 <B>e0</B> <B>5b</B> (LeftWindow),
172 <B>e0</B> <B>5c</B> (RightWindow),
173 <B>e0</B> <B>5d</B> (Menu).
174 <P>
175 <H2><A NAME="ss2.12">2.12 Microsoft Internet keyboard</A>
176 </H2>
177
178 <P>In addition to the three extra keys on the Microsoft Natural keyboard,
179 this keyboard has ten keys, with escaped scancodes
180 <B>e0</B> <B>21</B> (Calculator),
181 <B>e0</B> <B>32</B> (Web/Home),
182 <B>e0</B> <B>5f</B> (Sleep),
183 <B>e0</B> <B>65</B> (Search),
184 <B>e0</B> <B>66</B> (Favorites),
185 <B>e0</B> <B>68</B> (Stop),
186 <B>e0</B> <B>69</B> (Forward),
187 <B>e0</B> <B>6a</B> (Back),
188 <B>e0</B> <B>6b</B> (My Computer),
189 <B>e0</B> <B>6c</B> (Mail).
190 <P>
191 <H2><A NAME="ss2.13">2.13 Logitech Internet keyboard</A>
192 </H2>
193
194 <P>Jonathan DeBoer &lt;deboer@ugrad.cs.ualberta.ca&gt;
195 reports Key-down and key-up scancodes for a Logitech Internet keyboard.
196 <P> 0xe0 0x7a 0xe0 0xfa
197 <P> 0xe0 0x32 0xe0 0xb2
198 <P> 0xe0 0x21 0xe0 0xa1
199 <P> 0xe0 0x23 0xe0 0xa3
200 <P> 0x38 0x2a 0x0f 0x8f 0x8f 0xb8 0xaa
201 <P> 0xe0 0x17 0xe0 0x97
202 <P> 0xe0 0x10 0xe0 0x90
203 <P> 0xe0 0x22 0xe0 0xa2
204 <P> 0xe0 0x24 0xe0 0xa4
205 <P> 0xe0 0x19 0xe0 0x99
206 <P> 0xe0 0x1e 0xe0 0x9e
207 <P> 0xe0 0x12 0xe0 0x92
208 <P> 0xe0 0x26 0xe0 0xa6
209 <P> 0xe0 0x18 0xe0 0x98
210 <P> 0xe0 0x20 0xe0 0xa0
211 <P> 0xe0 0x30 0xe0 0xb0
212 <P> 0xe0 0x2e 0xe0 0xae
213 <P> 0xe0 0x25 0xe0 0xa5
214 <P> (But I have no keycap information.)
215 <P>
216 <H2><A NAME="e0_as_key"></A> <A NAME="ss2.14">2.14 A keyboard using e0 as ordinary scancode</A>
217 </H2>
218
219 <P>Benjamin Carter &lt;bcarter@ultra5.cs.umr.edu&gt; reports:
220 <P><I>I recently came into possession of a 97-key keyboard with Japanese
221 markings on the keys. (The keys also have the standard
222 qwerty-characters on them, with the exception of some of the meta-keys
223 (there are 3 keys near the Alt keys on either side of the spacebar with
224 only Japanese characters on them so I don't know what they are).
225 In any case, the keyboard sends out scancodes that work for all the main
226 keys (backspace, letters and numbers, enter, shift), but the numeric
227 keypad, Alt keys, and function keys don't work.
228 I have run the board through <CODE>showkey -s</CODE>, so I know what
229 scancodes this keyboard sends out.
230 However, the F9 and F10 keys send out <B>60</B> and <B>61</B>,
231 respectively, so their key release events send out <B>e0</B>
232 and <B>e1</B>, confusing the keyboard driver.</I>
233 <P># These are across the top of the keyboard.
234 <P><B>58</B> (F1), <B>59</B> (F2), <B>5a</B> (F3),
235 <B>5b</B> (F4), <B>5c</B> (F5), <B>5d</B> (F6),
236 <B>5e</B> (F7), <B>5f</B> (F8), <B>60</B> (F9),
237 <B>61</B> (F10), <B>62</B> (F11), <B>63</B> (F12)
238 <P>
239 <B>76</B> (Break), <B>77</B> (Setup).
240 <P>
241 # top row
242 <P><B>64</B> (Esc),
243 <B>02</B> (1), <B>03</B> (2), <B>04</B> (3),
244 <B>05</B> (4), <B>06</B> (5), <B>07</B> (6),
245 <B>08</B> (7), <B>09</B> (8), <B>0a</B> (9),
246 <B>0b</B> (0), <B>0c</B> (-), <B>0d</B> (=),
247 <B>29</B> (`), <B>0e</B> (Backspace)
248 <P>
249 <P># 2nd row
250 <P><B>0f</B> (Tab),
251 <B>10</B> (Q), <B>11</B> (W), <B>12</B> (E),
252 <B>13</B> (R), <B>14</B> (T), <B>15</B> (Y),
253 <B>16</B> (U), <B>17</B> (I), <B>18</B> (O),
254 <B>19</B> (P), <B>1a</B> ([), <B>1b</B> (]),
255 <B>79</B> (Del), <B>6e</B> (Line Feed)
256 <P>
257 <P># 3rd row
258 <P><B>38</B> (Ctrl),
259 <B>1e</B> (A), <B>1f</B> (S), <B>20</B> (D),
260 <B>21</B> (F), <B>22</B> (G), <B>23</B> (H),
261 <B>24</B> (J), <B>25</B> (K), <B>26</B> (L),
262 <B>27</B> (;), <B>28</B> ('), <B>75</B> (\),
263 <B>1c</B> (Return)
264 <P>
265 <P># 4th row
266 <P><B>2a</B> (Shift_L),
267 <B>2c</B> (Z), <B>2d</B> (X), <B>2e</B> (C),
268 <B>2f</B> (V), <B>30</B> (B), <B>31</B> (N),
269 <B>32</B> (M), <B>33</B> (,), <B>34</B> (.),
270 <B>35</B> (/),
271 <B>3a</B> ((unknown)),
272 <B>36</B> (Shift_R)
273 <P>
274 <P># bottom row
275 <P><B>1d</B> (Caps Lock), <B>71</B> (Alt_L),
276 <B>01</B> ((unknown)),
277 <B>39</B> (Space),
278 <B>45</B> ((unknown)),
279 <B>72</B> (Alt_R),
280 <B>46</B> ((unknown))
281 <P>
282 <P># numeric keypad. No "grey" section on the keyboard.
283 <P><B>47</B> (7), <B>48</B> (8), <B>49</B> (9),
284 <B>54</B> (Keypad -),
285 <B>4b</B> (4), <B>4c</B> (5), <B>4d</B> (6),
286 <B>37</B> (Keypad +),
287 <B>4f</B> (1), <B>50</B> (2), <B>51</B> (3),
288 <B>4e</B> (Keypad Enter),
289 <B>52</B> (0),
290 <B>78</B> (Up),
291 <B>53</B> (Keypad .),
292 <B>56</B> (Left),
293 <B>55</B> (Down),
294 <B>7d</B> (Right),
295 <B>7e</B> (Keypad ,).
296 <P>
297 <P>There are more keyboards that do not use <B>e0</B> as escape code.
298 For example, Paul Schulz &lt;pauls@caemrad.com.au&gt;
299 reports the same for Sun Type 5 Keyboard with PS/2 connector,
300 NCD model N-123NA. A kernel patch is required for such keyboards.
301 <P>
302 <P>
303 <H2><A NAME="ss2.15">2.15 IBM ThinkPad</A>
304 </H2>
305
306 <P>George Staikos &lt;staikos@0wned.org&gt; writes:
307 <P><I>I have an IBM ThinkPad i1460. It has the IBM EasyLaunch&lt;tm&gt; keys.
308 These are four multicoloured keys up at the top of the keyboard
309 for "Home Page", "Search", "Shop", "Mail". They dont' seem to create
310 any keyboard events at all. The keyboard interrupt doesn't trigger,
311 <CODE>showkeys</CODE> doesn't see them do anything, and in DOS, a simple
312 sequence of BIOS calls doesn't see them either.
313 Also, being a laptop, it has an FN key. This key generates <B>55</B>.</I>
314 <P>
315 <H2><A NAME="ss2.16">2.16 Keyboards with many keys</A>
316 </H2>
317
318 <P>The current mechanism is unable to handle keyboards with more than
319 127 keys. But such keyboards seem to exist. (So far, nobody has
320 reported `I have one', but there are several reports saying
321 `I have heard about someone who has one'.)
322 <P>Mark Hatle &lt;fray@kernel.crashing.org&gt; wrote:
323 <P><I>On some ADB keyboards there are actually 128 distinct keys.
324 They use scancodes 0-127.</I>
325 <P><I>ADB is Apple Desktop Bus. The way that ADB works is similar to SCSI but
326 on a much slower level. Specifically there is a communications chip in
327 the computer, ADB controller, and the same chip in the keyboard. The
328 keyboard sends the scancode to its internal ADB controller, the internal
329 ADB controller then does any key mapping needed (not used under linux
330 from my understanding) and passes the data to the computer.</I>
331 <P><I>The ADB controller is capable of sending 256 distinct keys, but to my
332 knowledge only 128 are sent. The key 0 is the 'a' and key 127 is the
333 "power button".</I>
334 <P><I>Also some of the Apple ADB keyboards have special "sound" and "function"
335 keys. These keys (used in MacOS for volume up and down, screen contrast
336 changing, etc) also show up on the ADB scancodes.</I>
337 <P><I>ADB is used for both m68k and PPC Linux. The m68k Macintosh port, and
338 the PPC - Power Macintosh and CHRP ports.</I>
339 <P>and later:
340 <P><I>Basically the scancode sequences for ADB are 16 bit. so there can actually
341 be 65536 scancodes, currently though only 128 are defined.</I>
342 <P>
343 <HR>
344 <A HREF="scancodes-3.html">Next</A>
345 <A HREF="scancodes-1.html">Previous</A>
346 <A HREF="scancodes.html#toc2">Contents</A>
347 </BODY>
348 </HTML>
0 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
1 <HTML>
2 <HEAD>
3 <META NAME="GENERATOR" CONTENT="SGML-Tools 1.0.9">
4 <TITLE>Keyboard scancodes: Reporting</TITLE>
5 <LINK HREF="scancodes-2.html" REL=previous>
6 <LINK HREF="scancodes.html#toc3" REL=contents>
7 </HEAD>
8 <BODY>
9 Next
10 <A HREF="scancodes-2.html">Previous</A>
11 <A HREF="scancodes.html#toc3">Contents</A>
12 <HR>
13 <H2><A NAME="s3">3. Reporting</A></H2>
14
15 <P>Additions and corrections are welcome.
16 Use <CODE>showkey -s</CODE> to get the scancodes.
17 Mention keyboard manufacturer and type, and the keycaps.
18 <P>Andries Brouwer - <CODE>aeb@cwi.nl</CODE>
19 <P>
20 <HR>
21 Next
22 <A HREF="scancodes-2.html">Previous</A>
23 <A HREF="scancodes.html#toc3">Contents</A>
24 </BODY>
25 </HTML>
0 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
1 <HTML>
2 <HEAD>
3 <META NAME="GENERATOR" CONTENT="SGML-Tools 1.0.9">
4 <TITLE>Keyboard scancodes</TITLE>
5 <LINK HREF="scancodes-1.html" REL=next>
6
7
8 </HEAD>
9 <BODY>
10 <A HREF="scancodes-1.html">Next</A>
11 Previous
12 Contents
13 <HR>
14 <H1>Keyboard scancodes</H1>
15
16 <H2>Andries Brouwer, <CODE>aeb@cwi.nl</CODE></H2>v1.0, 991209
17 <P><HR>
18 <EM>This note contains some information about PC keyboard scancodes.</EM>
19 <HR>
20 <P>
21 <H2><A NAME="toc1">1.</A> <A HREF="scancodes-1.html">Ordinary PC keyboards</A></H2>
22
23 <UL>
24 <LI><A HREF="scancodes-1.html#ss1.1">1.1 Key release</A>
25 <LI><A HREF="scancodes-1.html#ss1.2">1.2 Protocol scancodes</A>
26 <LI><A HREF="scancodes-1.html#ss1.3">1.3 Escape scancodes</A>
27 <LI><A HREF="scancodes-1.html#ss1.4">1.4 Ordinary scancodes</A>
28 <LI><A HREF="scancodes-1.html#ss1.5">1.5 Escaped scancodes</A>
29 <LI><A HREF="scancodes-1.html#ss1.6">1.6 Fake shifts</A>
30 <LI><A HREF="scancodes-1.html#ss1.7">1.7 Turbo Mode</A>
31 <LI><A HREF="scancodes-1.html#ss1.8">1.8 Scancode modes</A>
32 </UL>
33 <P>
34 <H2><A NAME="toc2">2.</A> <A HREF="scancodes-2.html">Special keyboards</A></H2>
35
36 <UL>
37 <LI><A HREF="scancodes-2.html#ss2.1">2.1 Focus KeyPro FK-9000 keyboard</A>
38 <LI><A HREF="scancodes-2.html#ss2.2">2.2 BTC keyboard</A>
39 <LI><A HREF="scancodes-2.html#ss2.3">2.3 LK450 keyboard</A>
40 <LI><A HREF="scancodes-2.html#ss2.4">2.4 OmniKey keyboard</A>
41 <LI><A HREF="scancodes-2.html#ss2.5">2.5 GRiD 2260 keyboard</A>
42 <LI><A HREF="scancodes-2.html#ss2.6">2.6 A Japanese 86/106 keyboard</A>
43 <LI><A HREF="scancodes-2.html#ss2.7">2.7 Brazilian keyboard</A>
44 <LI><A HREF="scancodes-2.html#ss2.8">2.8 RC930 keyboard</A>
45 <LI><A HREF="scancodes-2.html#ss2.9">2.9 Tandberg Data keyboard</A>
46 <LI><A HREF="scancodes-2.html#ss2.10">2.10 A keyboard</A>
47 <LI><A HREF="scancodes-2.html#ss2.11">2.11 Microsoft Natural keyboard</A>
48 <LI><A HREF="scancodes-2.html#ss2.12">2.12 Microsoft Internet keyboard</A>
49 <LI><A HREF="scancodes-2.html#ss2.13">2.13 Logitech Internet keyboard</A>
50 <LI><A HREF="scancodes-2.html#ss2.14">2.14 A keyboard using e0 as ordinary scancode</A>
51 <LI><A HREF="scancodes-2.html#ss2.15">2.15 IBM ThinkPad</A>
52 <LI><A HREF="scancodes-2.html#ss2.16">2.16 Keyboards with many keys</A>
53 </UL>
54 <P>
55 <H2><A NAME="toc3">3.</A> <A HREF="scancodes-3.html">Reporting</A></H2>
56
57 <HR>
58 <A HREF="scancodes-1.html">Next</A>
59 Previous
60 Contents
61 </BODY>
62 </HTML>
0 <!doctype linuxdoc system>
1
2 <article>
3
4 <title>Keyboard scancodes
5 <author>Andries Brouwer, <tt/aeb@cwi.nl/
6 <date>v1.0, 991209
7
8 <abstract>
9 This note contains some information about PC keyboard scancodes.
10 </abstract>
11
12 <toc>
13
14 <sect>Ordinary PC keyboards<p>
15 The data from a keyboard comes mainly in the form of scancodes,
16 produced by key presses or used in the protocol with the computer.
17 (Different codes are used by the keyboard firmware internally,
18 and there also exist several
19 <ref id="scancode_modes" name="sets of scancodes">. Here, for the
20 time being, we only give the default codes - those from scancode set 2.)
21 Each key press and key release produces between 0 and 6 scancodes.
22
23 <sect1>Key release<p>
24 Below I'll only mention the scancode for key press (`make').
25 The scancode for key release (`break') is obtained from it
26 by setting the high order bit (adding 0x80 = 128).
27 Thus, Esc press produces scancode <bf>01</bf>, Esc release
28 scancode <bf>81</bf> (hex).
29 For sequences things are similar: Keypad-/ gives <bf>e0</bf> <bf>35</bf>
30 when pressed, <bf>e0</bf> <bf>b5</bf> when released. Most keyboards will
31 repeat the make code (key down code) when the key repeats. Some will also
32 fake Shift down and Shift up events during the repeat.
33
34 The keys PrtSc/SysRq and Pause/Break are special.
35 The former produces scancode <bf>e0</bf> <bf>2a</bf> <bf>e0</bf> <bf>37</bf>
36 when no modifier key is pressed simultaneously, <bf>e0</bf> <bf>37</bf>
37 together with Shift or Ctrl, but <bf>54</bf> together with (left or right) Alt.
38 The latter produces scancode sequence
39 <bf>e1</bf> <bf>1d</bf> <bf>45</bf> <bf>e1</bf> <bf>9d</bf> <bf>c5</bf>
40 when pressed (without modifier) and nothing at all upon release.
41 However, together with (left or right) Ctrl, one gets
42 <bf>e0</bf> <bf>46</bf> <bf>e0</bf> <bf>c6</bf>,
43 and again nothing at release. It does not repeat.
44
45
46 <sect1>Protocol scancodes<p>
47 Most scancodes indicate a key press or release.
48 Some are used in the communication protocol.
49 <p>
50 <bf>00</bf> (Keyboard buffer overflow or parity error)
51 <p>
52 <bf>aa</bf> (BAT [Basic Assurance Test] OK)
53 <p>
54 <bf>ee</bf> (Result of echo command)
55 <p>
56 <bf>f1</bf> (Some keyboards, as reply to command <bf>a4</bf>:
57 Password not installed)
58 <p>
59 <bf>fa</bf> (Ack)
60 <p>
61 <bf>fc</bf> (BAT error or Mouse transmit error)
62 <p>
63 <bf>fe</bf> (Keyboard fails to ack, please resend)
64 <p>
65 <bf>ff</bf> (Keyboard parity error)
66
67 <sect1>Escape scancodes<p>
68 The codes <bf>e0</bf> and <bf>e1</bf> introduce scancode sequences,
69 and are not usually used as isolated scancodes themselves
70 (but see <ref id="e0_as_key" name="below">).
71 <p>
72 This, and the above, means that scancodes
73 <bf>00</bf>, <bf>60</bf>, <bf>61</bf>, <bf>6e</bf>, <bf>71</bf>,
74 <bf>7a</bf>, <bf>7c</bf>, <bf>7e</bf>, <bf>7f</bf>
75 are unavailable to signify key presses (on a default keyboard;
76 we'll see keyboards that actually use scancode <bf>60</bf>).
77 <p>
78 Also other prefixes occur, see <ref id="prefix_80" name="below">.
79
80 <sect1>Ordinary scancodes<p>
81 The scancodes in scancode set 2 are given in hex.
82 Between parentheses the keycap on a US keyboard.
83 The scancodes are given in order, grouped according
84 to groups of keys that are usually found next to each other.
85 <p>
86 <bf>00</bf> is normally an error code
87 <p>
88 <bf>01</bf> (Esc)
89 <p>
90 <bf>02</bf> (1!), <bf>03</bf> (2@), <bf>04</bf> (3#), <bf>05</bf> (4$),
91 <bf>06</bf> (5%E), <bf>07</bf> (6^), <bf>08</bf> (7&amp;),
92 <bf>09</bf> (8*), <bf>0a</bf> (9(), <bf>0b</bf> (0)), <bf>0c</bf> (-_),
93 <bf>0d</bf> (=+), <bf>0e</bf> (Backspace)
94 <p>
95 <bf>0f</bf> (Tab), <bf>10</bf> (Q), <bf>11</bf> (W), <bf>12</bf> (E),
96 <bf>13</bf> (R), <bf>14</bf> (T), <bf>15</bf> (Y),
97 <bf>16</bf> (U), <bf>17</bf> (I), <bf>18</bf> (O),
98 <bf>19</bf> (P), <bf>1a</bf> ([{), <bf>1b</bf> (]})
99 <p>
100 <bf>1c</bf> (Enter)
101 <p>
102 <bf>1d</bf> (LCtrl)
103 <p>
104 <bf>1e</bf> (A), <bf>1f</bf> (S), <bf>20</bf> (D), <bf>21</bf> (F),
105 <bf>22</bf> (G), <bf>23</bf> (H), <bf>24</bf> (J), <bf>25</bf> (K),
106 <bf>26</bf> (L), <bf>27</bf> (;:), <bf>28</bf> ('")
107 <p>
108 <bf>29</bf> (`&tilde;)
109 <p>
110 <bf>2a</bf> (LShift)
111 <p>
112 <bf>2b</bf> (\|), on a 102-key keyboard
113 <p>
114 <bf>2c</bf> (Z), <bf>2d</bf> (X), <bf>2e</bf> (C), <bf>2f</bf> (V),
115 <bf>30</bf> (B), <bf>31</bf> (N), <bf>32</bf> (M), <bf>33</bf> (,&lt;),
116 <bf>34</bf> (.&gt;), <bf>35</bf> (/?), <bf>36</bf> (RShift)
117 <p>
118 <bf>37</bf> (Keypad-*) or (*/PrtScn) on a 83/84-key keyboard
119 <p>
120 <bf>38</bf> (LAlt), <bf>39</bf> (Space bar),
121 <p>
122 <bf>3a</bf> (CapsLock)
123 <p>
124 <bf>3b</bf> (F1), <bf>3c</bf> (F2), <bf>3d</bf> (F3), <bf>3e</bf> (F4),
125 <bf>3f</bf> (F5), <bf>40</bf> (F6), <bf>41</bf> (F7),
126 <bf>42</bf> (F8), <bf>43</bf> (F9), <bf>44</bf> (F10)
127 <p>
128 <bf>45</bf> (NumLock)
129 <p>
130 <bf>46</bf> (ScrollLock)
131 <p>
132 <bf>47</bf> (Keypad-7/Home), <bf>48</bf> (Keypad-8/Up),
133 <bf>49</bf> (Keypad-9/PgUp)
134 <p>
135 <bf>4a</bf> (Keypad--)
136 <p>
137 <bf>4b</bf> (Keypad-4/Left), <bf>4c</bf> (Keypad-5),
138 <bf>4d</bf> (Keypad-6/Right), <bf>4e</bf> (Keypad-+)
139 <p>
140 <bf>4f</bf> (Keypad-1/End), <bf>50</bf> (Keypad-2/Down),
141 <bf>51</bf> (Keypad-3/PgDn)
142 <p>
143 <bf>52</bf> (Keypad-0/Ins), <bf>53</bf> (Keypad-./Del)
144 <p>
145 <bf>54</bf> (Alt-SysRq) on a 84+ key keyboard
146 <p>
147 <bf>55</bf> is less common; occurs as PF1 on a Focus 9000 keyboard,
148 and as FN on an IBM ThinkPad.
149 <p>
150 <bf>56</bf> mostly on non-US keyboards. It is an unlabelled key
151 next to the space bar on a Toshiba notebook.
152 <p>
153 <bf>57</bf> (F11), <bf>58</bf> (F12) both on a 101+ key keyboard
154 <p>
155 <bf>59</bf>-<bf>5a</bf>-...-<bf>7f</bf> are less common.
156 Scancodes <bf>59</bf>-<bf>5c</bf> occur on the RC930 keyboard.
157 X calls <bf>5d</bf> `KEY_Begin'.
158 Scancodes <bf>55</bf>, <bf>6d</bf>, <bf>6f</bf>, <bf>73</bf>, <bf>74</bf>,
159 <bf>77</bf>, <bf>78</bf>, <bf>79</bf>, <bf>7a</bf>, <bf>7b</bf>,
160 <bf>7c</bf>, <bf>7e</bf> occur on the Focus 9000 keyboard.
161 Scancodes <bf>73</bf>, <bf>7d</bf> occur on a Japanese 86/106 keyboard.
162 <p>
163
164 <sect1>Escaped scancodes<p>
165 Apart from the Pause/Break key that has an escaped sequence starting
166 with <bf>e1</bf>, the escape used is <bf>e0</bf>. Often, the codes
167 are chosen in such a way that something meaningful happens when
168 the receiver just discards the <bf>e0</bf>.
169 <p>
170 <bf>e0</bf> <bf>1c</bf> (Keypad Enter) - <bf>1c</bf> (Enter)
171 <p>
172 <bf>e0</bf> <bf>1d</bf> (RCtrl) - <bf>1d</bf> (LCtrl)
173 <p>
174 <bf>e0</bf> <bf>2a</bf> (fake LShift) - <bf>2a</bf> (LShift)
175 <p>
176 <bf>e0</bf> <bf>35</bf> (Keypad-/) - <bf>35</bf> (/?)
177 <p>
178 <bf>e0</bf> <bf>36</bf> (fake RShift) - <bf>36</bf> (RShift)
179 <p>
180 <bf>e0</bf> <bf>37</bf> (Ctrl-PrtScn) - <bf>37</bf> (*/PrtScn)
181 <p>
182 <bf>e0</bf> <bf>38</bf> (RAlt) - <bf>38</bf> (LAlt)
183 <p>
184 <bf>e0</bf> <bf>46</bf> (Ctrl-Break) - <bf>46</bf> (ScrollLock)
185 <p>
186 <bf>e0</bf> <bf>47</bf> (Grey Home) - <bf>47</bf> (Keypad-7/Home)
187 <p>
188 <bf>e0</bf> <bf>48</bf> (Grey Up) - <bf>48</bf> (Keypad-8/UpArrow)
189 <p>
190 <bf>e0</bf> <bf>49</bf> (Grey PgUp) - <bf>49</bf> (Keypad-9/PgUp)
191 <p>
192 <bf>e0</bf> <bf>4b</bf> (Grey Left) - <bf>4b</bf> (Keypad-4/Left)
193 <p>
194 <bf>e0</bf> <bf>4d</bf> (Grey Right) - <bf>4d</bf> (Keypad-6/Right)
195 <p>
196 <bf>e0</bf> <bf>4f</bf> (Grey End) - <bf>4f</bf> (Keypad-1/End)
197 <p>
198 <bf>e0</bf> <bf>50</bf> (Grey Down) - <bf>50</bf> (Keypad-2/DownArrow)
199 <p>
200 <bf>e0</bf> <bf>51</bf> (Grey PgDn) - <bf>51</bf> (Keypad-3/PgDn)
201 <p>
202 <bf>e0</bf> <bf>52</bf> (Grey Insert) - <bf>52</bf> (Keypad-0/Ins)
203 <p>
204 <bf>e0</bf> <bf>53</bf> (Grey Delete) - <bf>53</bf> (Keypad-./Del)
205 <p>
206 These escaped scancodes occur only on 101+ key keyboards.
207
208 <sect1>Fake shifts<p>
209 The ten grey keys Insert, Home, PgUp, Delete, End, PgDn,
210 Up, Left, Down, Right are supposed to function regardless
211 of the state of Shift and NumLock keys. But for an old AT keyboard
212 the keypad keys would produce digits when Numlock was on or Shift
213 was down. Therefore, in order to fool old programs,
214 fake scancodes are sent: when LShift is down, and Insert is
215 pressed, <bf>e0</bf> <bf>aa</bf> <bf>e0</bf> <bf>52</bf> is sent;
216 upon release of Insert <bf>e0</bf> <bf>d2</bf> <bf>e0</bf> <bf>2a</bf>
217 is sent. In other words, a fake LShift-up and
218 fake LShift-down are inserted.
219
220 If the Shift key is released earlier than the repeated key,
221 then a real Shift-up code occurs (without preceding fake Shift-down)
222 so that a program ignoring <bf>e0</bf> would see one more Shift-up
223 than Shift-down.
224
225 When NumLock is on, no fake Shifts are sent when Shift was down,
226 but fake Shifts are sent when Shift was not down. Thus,
227 with Numlock, if Insert is pressed,
228 <bf>e0</bf> <bf>2a</bf> <bf>e0</bf> <bf>52</bf> is sent
229 and upon release <bf>e0</bf> <bf>d2</bf> <bf>e0</bf> <bf>aa</bf> is sent.
230 The keyboard maintains a private NumLock mode, toggled when
231 NumLock is pressed, and set when the NumLock LED is set.
232
233 In the same way, when Shift is down, the Grey-/ key produces
234 fake Shift-up and fake Shift-down sequences. However, it does
235 not react to the state of NumLock. The purpose of course is to
236 fool programs that identify Grey-/ with ordinary /, so that they
237 don't treat Shift-Grey-/ like Shift-/, i.e., ?.
238
239 On a Toshiba notebook, the three Windows keys are treated like
240 the group of ten keys mentioned, and get fake shifts when
241 (left or right) Shift is down. Thet do not react to NumLock.
242
243 <sect1>Turbo Mode<p>
244 On some motherboards the LCtrl-LAlt-GreyPlus and LCtrl-LAlt-GreyMinus
245 switch Turbo mode on/off, respectively. For these, the motherboard
246 may generate the same scancode sequence when the Turbo button is
247 pushed: Turbo Switch (High->Low):
248 <bf>1d</bf> <bf>38</bf> <bf>4a</bf> <bf>ce</bf> <bf>b8</bf> <bf>9d</bf>
249 and Turbo Switch (Low->High):
250 <bf>1d</bf> <bf>38</bf> <bf>4e</bf> <bf>ce</bf> <bf>b8</bf> <bf>9d</bf>.
251 <p>
252 Other peculiar combinations in this style include
253 LCtrl-LAlt-LShift-GreyMinus to turn off system cache.
254 <p>
255 Thio Yu Jin &lt;jin@singmail.com&gt; complains that on his Toshiba 4010CDS
256 the Ctrl-Alt-Shift-T key combination brings up the Toshiba user manual.
257 (04 Mar 1999 - not April 1.)
258 <p>
259
260 <sect1>Scancode modes
261 <label id="scancode_modes">
262 <p>
263 The usual PC keyboards are capable of producing three
264 sets of scancodes. Writing 0xf0 followed by 1, 2 or 3 to port
265 0x60 will put the keyboard in scancode mode 1, 2 or 3. Writing
266 0xf0 followed by 0 queries the mode, resulting in a scancode
267 byte 0x43, 0x41 or 0x3f from the keyboard.
268 <p>
269 Scancode mode 2 is the default. In this mode, a key press
270 usually produces a value <it>s</it> in the range 0x01-0x5f and the
271 corresponding key release produces <it>s</it>+0x80. In scancode
272 mode 3, the only key releases that produce a scan code are of
273 either Shift key, or of the left Ctrl and Alt keys; for all
274 other keys only the key presses are noted. The produced
275 scancodes are mostly equal to those for scancode mode 2.
276 <p>
277 In scancode mode 1 most key releases produce the same values as
278 in scancode mode 2, but for key presses there are entirely
279 different, unrelated values. The details are somewhat messy.
280
281 <sect>Special keyboards<p>
282
283 <sect1>Focus KeyPro FK-9000 keyboard<p>
284 Raul D. Miller &lt;rockwell@nova.umd.edu&gt;
285 and &lt;hagmanti@cps.msu.edu&gt; report:
286 <p>
287 <it>
288 The keyboard is a KeyPro FK-9000. The FCC label says it's made in
289 Taiwan by Focus Electronic Co, Ltd. It has a built-in calculator.
290 </it>
291 <p>
292 <it>
293 This keyboard has twelve additional keys, with scancodes
294 </it>
295 <bf>55</bf> (PF1),
296 <bf>6d</bf> (PF11),
297 <bf>6f</bf> (PF12),
298 <bf>73</bf> (PF2),
299 <bf>74</bf> (PF9),
300 <bf>77</bf> (PF3),
301 <bf>78</bf> (PF4),
302 <bf>79</bf> (PF5),
303 <bf>7a</bf>* (PF6),
304 <bf>7b</bf> (PF7),
305 <bf>7c</bf> (PF8),
306 <bf>7e</bf>* (PF10).
307 <p>
308 <it>
309 The break codes equal the make codes ORed with 0x80, as always,
310 but the Linux kernel eats <bf>fa</bf> and <bf>fe</bf> as
311 protocol bytes.
312 </it>
313 <p>
314 <it>
315 The behavior of these keys is different from that of normal keys--
316 they generate nothing when pressed; then generate the above scancodes
317 at the normal repeat time and rate, and then generate (except for the
318 starred ones) their scancode ORed with 0x80 when released...
319 </it>
320 <p>
321 <it>
322 These PF keys are reprogrammable -- and programming occurs as a sequence
323 of keyboard actions. Therefore, the PF keys duplicate whatever
324 keyboard actions occurred during their programming.
325 You hit the "Prog" key, then the PF key you want to program; type the
326 string you want to store in the key (it's limited to 14 keypresses),
327 and then hit the PF key again. After that, when you hit the PF key,
328 it sends the string, and generates its own abnormal scancode upon
329 release. When the key is held down, it generates the scancode repeatedly,
330 but does not generate the string stored in it repeatedly.
331 </it>
332 <p>
333 <it>
334 When you go to program a key, the scancodes for "PF##-" are sent
335 to the computer, then the scancodes for each key you hit as you
336 hit it (the shift, etc. keys are an exception-- they send "s-"
337 and such :), and then, when you hit the PF## key again to end the
338 programming, it sends a sequence of (at least) 18 "0e 8e"s --
339 Backspaces...
340 </it>
341 <p>
342 <it>
343 The program key itself doesn't generate a scancode at any time.
344 The same applies to the CE and AC/ON keys (part of the calculator).
345 There is a switch to change between calculator and keyboard mode
346 which generates no scancodes.
347 </it>
348 <p>
349 <it>
350 When the keyboard is in calculator mode, the entire numeric
351 keypad (and everything else on the right side) generates no
352 scancodes.
353 </it>
354 <p>
355 <it>
356 When the keyboard is not in caluclator mode, the %, MC, MR, M-,
357 M+, and Square Root keys all generate 0xff when pressed,
358 0xff to repeat, and 0xff on release.
359 </it>
360 <p>
361 <it>
362 The little unlabeled key between the right Ctrl and right Alt
363 generates <bf>56</bf> when hit, repeats that, and then <bf>d6</bf>
364 when released, just like a normal key.
365 </it>
366 <p>
367
368 <sect1>BTC keyboard<p>
369 This keyboard has one additional key, with escaped scancode
370 <bf>e0</bf> <bf>6f</bf> (Macro).
371
372 <sect1>LK450 keyboard<p>
373 This keyboard has six additional keys, with escaped scancodes
374 <bf>e0</bf> <bf>3d</bf> (F13),
375 <bf>e0</bf> <bf>3e</bf> (F14),
376 <bf>e0</bf> <bf>3f</bf> (Help),
377 <bf>e0</bf> <bf>40</bf> (Do),
378 <bf>e0</bf> <bf>41</bf> (F17),
379 <bf>e0</bf> <bf>4e</bf> (Keypad-minplus).
380
381 <sect1>OmniKey keyboard<p>
382 This keyboard has one additional key, with escaped scancode
383 <bf>e0</bf> <bf>4c</bf> (Omni).
384
385 <sect1>GRiD 2260 keyboard<p>
386 The GRiD 2260 notebook has a key producing the
387 <bf>6c</bf> scancode; I do not know the keycap.
388
389 <sect1>A Japanese 86/106 keyboard<p>
390 Barry Yip &lt;g609296@cc.win.or.jp&gt; reports:
391 <p>
392 <it>
393 This keyboard has two additional keys, with scancodes
394 <bf>73</bf> (\-) and <bf>7d</bf> (\|).
395 This kind of keyboard is rather standard in Japan. They are called 106
396 keyboard. Mine is a notebook so it is 86 keyboard. No specific brand
397 name.
398 </it>
399
400 <sect1>Brazilian keyboard<p>
401 Arnaldo Moura &lt;lumbago@vnet.ibm.com&gt; reports:
402 <p>
403 <it>
404 This keyboard has two unusual keys, with scancodes
405 <bf>73</bf> (/?) and <bf>7e</bf> (Keypad-.).
406 </it>
407 <p>
408 Also others mention an ABNT keyboard with <bf>73</bf> and
409 <bf>7e</bf> keys, mostly because these keys do not function
410 with Windows NT 4.0.
411 <p>
412 ABNT (Associação Brasileira de Normas Tecnicas) and ABNT2
413 are Brazilian keyboard layout standards. The plain Brazilian
414 keyboard has 103 keys. I find an ABNT 107 key keyboard announced by
415 <htmlurl name="gertec" url="http://www.gertec.com.br/tecpc1.htm">.
416 with Suspend / Wake-up / Power power management keys.
417 <it>For enabling these functions, run BIOS setup.</it>
418
419 <sect1>RC930 keyboard<p>
420 Torben Fjerdingstad &lt;tfj@olivia.ping.dk&gt; reports:
421 <p>
422 <it>
423 It's an rc930 keyboard, from Regnecentralen/RC International, Now ICL.
424 This keyboard has four additional keys, with scancodes
425 </it>
426 <bf>59</bf> (A1),
427 <bf>5a</bf> (A2),
428 <bf>5b</bf> (A3),
429 <bf>5c</bf> (A4).
430 <p>
431 <it>
432 The rc930/rc931 keyboards are not made anymore, because they had a
433 problem with fast typists, writing over 400 chars/minute.
434 Writing 'af&lt;space&gt;', very, very fast, did a PgUp.
435 </it>
436
437 <sect1>Tandberg Data keyboard
438 <label id="prefix_80">
439 <p>
440 Kjetil Torgrim Homme &lt;kjetilho@ifi.uio.no&gt; reports:
441 <p>
442 <it>
443 My Tandberg Data keyboard uses the prefix <bf>80</bf> for
444 its numerous (20) extra keys. The <bf>80</bf> scancodes are:
445 </it><p>
446 <bf>11</bf>, <bf>12</bf>, <bf>13</bf>, <bf>14</bf>, <bf>16</bf>,
447 <bf>17</bf>, <bf>18</bf>, <bf>19</bf>, <bf>1e</bf>, <bf>1f</bf>,
448 <bf>20</bf>, <bf>21</bf>, <bf>22</bf>, <bf>23</bf>, <bf>25</bf>,
449 <bf>26</bf>, <bf>2f</bf>, <bf>30</bf>, <bf>32</bf>, <bf>56</bf>.
450 <p><it>
451 For completeness, the <bf>e0</bf> scancodes:
452 </it><p>
453 <bf>1c</bf>, <bf>2a</bf>, <bf>35</bf>, <bf>37</bf>, <bf>47</bf>,
454 <bf>48</bf>, <bf>49</bf>, <bf>4b</bf>, <bf>4d</bf>, <bf>4f</bf>,
455 <bf>50</bf>, <bf>51</bf>, <bf>52</bf>, <bf>53</bf>.
456 <p><it>
457 The <bf>e1</bf> scancode: <bf>1d</bf>.
458 As you can see, there is no overlap on this keyboard.
459 </it>
460
461 <sect1>A keyboard<p>
462 <it>Three unusual power keys: <bf>e0</bf> <bf>5e</bf>,
463 <bf>e0</bf> <bf>5f</bf>, <bf>e0</bf> <bf>63</bf>.</it>
464
465 <sect1>Microsoft Natural keyboard<p>
466 This keyboard has three additional keys, with escaped scancodes
467 <bf>e0</bf> <bf>5b</bf> (LeftWindow),
468 <bf>e0</bf> <bf>5c</bf> (RightWindow),
469 <bf>e0</bf> <bf>5d</bf> (Menu).
470
471 <sect1>Microsoft Internet keyboard<p>
472 In addition to the three extra keys on the Microsoft Natural keyboard,
473 this keyboard has ten keys, with escaped scancodes
474 <bf>e0</bf> <bf>21</bf> (Calculator),
475 <bf>e0</bf> <bf>32</bf> (Web/Home),
476 <bf>e0</bf> <bf>5f</bf> (Sleep),
477 <bf>e0</bf> <bf>65</bf> (Search),
478 <bf>e0</bf> <bf>66</bf> (Favorites),
479 <bf>e0</bf> <bf>68</bf> (Stop),
480 <bf>e0</bf> <bf>69</bf> (Forward),
481 <bf>e0</bf> <bf>6a</bf> (Back),
482 <bf>e0</bf> <bf>6b</bf> (My Computer),
483 <bf>e0</bf> <bf>6c</bf> (Mail).
484
485 <sect1>Logitech Internet keyboard<p>
486 Jonathan DeBoer &lt;deboer@ugrad.cs.ualberta.ca&gt;
487 reports Key-down and key-up scancodes for a Logitech Internet keyboard.
488 <p> 0xe0 0x7a 0xe0 0xfa
489 <p> 0xe0 0x32 0xe0 0xb2
490 <p> 0xe0 0x21 0xe0 0xa1
491 <p> 0xe0 0x23 0xe0 0xa3
492 <p> 0x38 0x2a 0x0f 0x8f 0x8f 0xb8 0xaa
493 <p> 0xe0 0x17 0xe0 0x97
494 <p> 0xe0 0x10 0xe0 0x90
495 <p> 0xe0 0x22 0xe0 0xa2
496 <p> 0xe0 0x24 0xe0 0xa4
497 <p> 0xe0 0x19 0xe0 0x99
498 <p> 0xe0 0x1e 0xe0 0x9e
499 <p> 0xe0 0x12 0xe0 0x92
500 <p> 0xe0 0x26 0xe0 0xa6
501 <p> 0xe0 0x18 0xe0 0x98
502 <p> 0xe0 0x20 0xe0 0xa0
503 <p> 0xe0 0x30 0xe0 0xb0
504 <p> 0xe0 0x2e 0xe0 0xae
505 <p> 0xe0 0x25 0xe0 0xa5
506 <p> (But I have no keycap information.)
507
508 <sect1>A keyboard using e0 as ordinary scancode
509 <label id="e0_as_key">
510 <p>
511 Benjamin Carter &lt;bcarter@ultra5.cs.umr.edu&gt; reports:
512 <p>
513 <it>
514 I recently came into possession of a 97-key keyboard with Japanese
515 markings on the keys. (The keys also have the standard
516 qwerty-characters on them, with the exception of some of the meta-keys
517 (there are 3 keys near the Alt keys on either side of the spacebar with
518 only Japanese characters on them so I don't know what they are).
519 In any case, the keyboard sends out scancodes that work for all the main
520 keys (backspace, letters and numbers, enter, shift), but the numeric
521 keypad, Alt keys, and function keys don't work.
522 I have run the board through <tt>showkey -s</tt>, so I know what
523 scancodes this keyboard sends out.
524 However, the F9 and F10 keys send out <bf>60</bf> and <bf>61</bf>,
525 respectively, so their key release events send out <bf>e0</bf>
526 and <bf>e1</bf>, confusing the keyboard driver.
527 </it>
528 <p>
529 # These are across the top of the keyboard.
530 <p>
531 <bf>58</bf> (F1), <bf>59</bf> (F2), <bf>5a</bf> (F3),
532 <bf>5b</bf> (F4), <bf>5c</bf> (F5), <bf>5d</bf> (F6),
533 <bf>5e</bf> (F7), <bf>5f</bf> (F8), <bf>60</bf> (F9),
534 <bf>61</bf> (F10), <bf>62</bf> (F11), <bf>63</bf> (F12)
535 <p>
536 <bf>76</bf> (Break), <bf>77</bf> (Setup).
537 <p>
538 # top row
539 <p>
540 <bf>64</bf> (Esc),
541 <bf>02</bf> (1), <bf>03</bf> (2), <bf>04</bf> (3),
542 <bf>05</bf> (4), <bf>06</bf> (5), <bf>07</bf> (6),
543 <bf>08</bf> (7), <bf>09</bf> (8), <bf>0a</bf> (9),
544 <bf>0b</bf> (0), <bf>0c</bf> (-), <bf>0d</bf> (=),
545 <bf>29</bf> (`), <bf>0e</bf> (Backspace)
546
547 <p>
548 # 2nd row
549 <p>
550 <bf>0f</bf> (Tab),
551 <bf>10</bf> (Q), <bf>11</bf> (W), <bf>12</bf> (E),
552 <bf>13</bf> (R), <bf>14</bf> (T), <bf>15</bf> (Y),
553 <bf>16</bf> (U), <bf>17</bf> (I), <bf>18</bf> (O),
554 <bf>19</bf> (P), <bf>1a</bf> ([), <bf>1b</bf> (]),
555 <bf>79</bf> (Del), <bf>6e</bf> (Line Feed)
556
557 <p>
558 # 3rd row
559 <p>
560 <bf>38</bf> (Ctrl),
561 <bf>1e</bf> (A), <bf>1f</bf> (S), <bf>20</bf> (D),
562 <bf>21</bf> (F), <bf>22</bf> (G), <bf>23</bf> (H),
563 <bf>24</bf> (J), <bf>25</bf> (K), <bf>26</bf> (L),
564 <bf>27</bf> (;), <bf>28</bf> ('), <bf>75</bf> (\),
565 <bf>1c</bf> (Return)
566
567 <p>
568 # 4th row
569 <p>
570 <bf>2a</bf> (Shift_L),
571 <bf>2c</bf> (Z), <bf>2d</bf> (X), <bf>2e</bf> (C),
572 <bf>2f</bf> (V), <bf>30</bf> (B), <bf>31</bf> (N),
573 <bf>32</bf> (M), <bf>33</bf> (,), <bf>34</bf> (.),
574 <bf>35</bf> (/),
575 <bf>3a</bf> ((unknown)),
576 <bf>36</bf> (Shift_R)
577
578 <p>
579 # bottom row
580 <p>
581 <bf>1d</bf> (Caps Lock), <bf>71</bf> (Alt_L),
582 <bf>01</bf> ((unknown)),
583 <bf>39</bf> (Space),
584 <bf>45</bf> ((unknown)),
585 <bf>72</bf> (Alt_R),
586 <bf>46</bf> ((unknown))
587
588 <p>
589 # numeric keypad. No "grey" section on the keyboard.
590 <p>
591 <bf>47</bf> (7), <bf>48</bf> (8), <bf>49</bf> (9),
592 <bf>54</bf> (Keypad -),
593 <bf>4b</bf> (4), <bf>4c</bf> (5), <bf>4d</bf> (6),
594 <bf>37</bf> (Keypad +),
595 <bf>4f</bf> (1), <bf>50</bf> (2), <bf>51</bf> (3),
596 <bf>4e</bf> (Keypad Enter),
597 <bf>52</bf> (0),
598 <bf>78</bf> (Up),
599 <bf>53</bf> (Keypad .),
600 <bf>56</bf> (Left),
601 <bf>55</bf> (Down),
602 <bf>7d</bf> (Right),
603 <bf>7e</bf> (Keypad ,).
604 <p>
605
606 There are more keyboards that do not use <bf>e0</bf> as escape code.
607 For example, Paul Schulz &lt;pauls@caemrad.com.au&gt;
608 reports the same for Sun Type 5 Keyboard with PS/2 connector,
609 NCD model N-123NA. A kernel patch is required for such keyboards.
610
611
612 <sect1>IBM ThinkPad<p>
613 George Staikos &lt;staikos@0wned.org&gt; writes:
614 <p><it>
615 I have an IBM ThinkPad i1460. It has the IBM EasyLaunch&lt;tm&gt; keys.
616 These are four multicoloured keys up at the top of the keyboard
617 for "Home Page", "Search", "Shop", "Mail". They dont' seem to create
618 any keyboard events at all. The keyboard interrupt doesn't trigger,
619 <tt>showkeys</tt> doesn't see them do anything, and in DOS, a simple
620 sequence of BIOS calls doesn't see them either.
621 Also, being a laptop, it has an FN key. This key generates <bf>55</bf>.
622 </it>
623
624 <sect1>Keyboards with many keys<p>
625 The current mechanism is unable to handle keyboards with more than
626 127 keys. But such keyboards seem to exist. (So far, nobody has
627 reported `I have one', but there are several reports saying
628 `I have heard about someone who has one'.)
629
630 Mark Hatle &lt;fray@kernel.crashing.org&gt; wrote:
631 <p>
632 <it>
633 On some ADB keyboards there are actually 128 distinct keys.
634 They use scancodes 0-127.
635 </it><p><it>
636 ADB is Apple Desktop Bus. The way that ADB works is similar to SCSI but
637 on a much slower level. Specifically there is a communications chip in
638 the computer, ADB controller, and the same chip in the keyboard. The
639 keyboard sends the scancode to its internal ADB controller, the internal
640 ADB controller then does any key mapping needed (not used under linux
641 from my understanding) and passes the data to the computer.
642 </it><p><it>
643 The ADB controller is capable of sending 256 distinct keys, but to my
644 knowledge only 128 are sent. The key 0 is the 'a' and key 127 is the
645 "power button".
646 </it><p><it>
647 Also some of the Apple ADB keyboards have special "sound" and "function"
648 keys. These keys (used in MacOS for volume up and down, screen contrast
649 changing, etc) also show up on the ADB scancodes.
650 </it><p><it>
651 ADB is used for both m68k and PPC Linux. The m68k Macintosh port, and
652 the PPC - Power Macintosh and CHRP ports.
653 </it><p>
654 and later:
655 <p><it>
656 Basically the scancode sequences for ADB are 16 bit. so there can actually
657 be 65536 scancodes, currently though only 128 are defined.
658 </it>
659
660 <sect>Reporting<p>
661 Additions and corrections are welcome.
662 Use <tt>showkey -s</tt> to get the scancodes.
663 Mention keyboard manufacturer and type, and the keycaps.
664 <p>
665 Andries Brouwer - <tt/aeb@cwi.nl/
666
667 </article>
+0
-34
doc/set_kbd_repeat less more
0 From: johnsonm@stolaf.edu (Michael K. Johnson)
1 Subject: changing keyboard repeat rate.
2
3 OK, I have gotten several requests for info on how to change the
4 keyboard repeat rate, so here goes. Note: I can't just give diffs,
5 because there are lots of options, and for heaven's sake it's only
6 three lines of code.
7
8 In boot/setup.S, there are the lines:
9
10 ! set the keyboard repeat rate to the max
11
12 mov ax,#0x0305
13 mov bx,0x0000
14 int 0x16
15
16 If you don't want to change the repeat rate at all, just comment out
17 these lines by prefacing them with !'s. If you want something in the
18 middle, change the
19 mov bx,0x0000
20 to mov bx,0x????
21 where ???? is determined by (from Ralf Brown's interrupt list)
22 bh = delay value (0x00 = 250 ms to 0x03 = 1000 ms (one second))
23 this is the delay before the repeat starts happening
24 bl = repeat rate (0x00 = 30/sec to 0x0c = 10/sec [default] to 0x1f = 2/sec)
25
26 I use mov bx,0x0006
27 to delay 1/4 sec, then repeat at what I think is a comfortable rate.
28 I am too lazy to calculate the exact speed -- maybe 20/sec? ;-)
29
30 Hope this helps people.
31
32 michaelkjohnson
33 johnsonm@stolaf.edu
4242 .SH "SEE ALSO"
4343 .BR setfont (8),
4444 .BR psfgettable (1),
45 .BR psfstriptable (1)
46
47
45 .BR psfstriptable (1),
46 .BR psfxtable (1)
1717 .SH "SEE ALSO"
1818 .BR setfont (8),
1919 .BR psfaddtable (1),
20 .BR psfstriptable (1)
21
22
20 .BR psfstriptable (1),
21 .BR psfxtable (1)
1818 .SH "SEE ALSO"
1919 .BR setfont (8),
2020 .BR psfaddtable (1),
21 .BR psfgettable (1)
22
23
21 .BR psfgettable (1),
22 .BR psfxtable (1)
0 .\" @(#)psfxtable.1
1 .TH PSFXTABLE 1 "9 Dec 1999"
2 .SH NAME
3 psfxtable \- handle Unicode character tables for console fonts
4 .SH SYNOPSIS
5 .B psfxtable
6 .RB [ \-i
7 .IR infont ]
8 .RB [ \-o
9 .IR outfont ]
10 .RB [ \-it
11 .IR intable ]
12 .RB [ \-ot
13 .IR outtable ]
14 .RB [ \-nt ]
15 .SH DESCRIPTION
16 .IX "psfxtable command" "" "\fLpsfxtable\fR command"
17 .LP
18 .B psfxtable
19 handles the embedded Unicode character table for .psf format
20 console fonts. It reads a font and possibly a table
21 and writes a font and/or a table.
22 .BR psfaddtable (1),
23 .BR psfgettable (1)
24 and
25 .BR psfstriptable (1)
26 are links to it.
27
28 Each of the filenames
29 .IR infont ,
30 .IR outfont ,
31 .IR intable ,
32 and
33 .IR outtable
34 may be replaced by a single dash (\-), in which case
35 standard input or standard output is used.
36 If no \-i option is given, the font is read from standard input.
37 If no \-it or \-o or \-ot option is given,
38 no input table is read or no output font or output table is written.
39
40 By default the output font (if any) will have a Unicode table
41 when either the input font has one, or an explicit table
42 (which overrides an input font table) has been provided.
43 The option \-nt causes output of a font without table.
44 When
45 .I outfont
46 is requested it will get a psf1 header when infont has
47 a psf1 header and
48 .I intable
49 does not have sequences and a psf2 header otherwise.
50 .SH "SEE ALSO"
51 .BR setfont (8),
52 .BR psfaddtable (1),
53 .BR psfgettable (1),
54 .BR psfstriptable (1)
1414 /*
1515 * Default keymap, and where the kernel copy of it lives.
1616 */
17 #ifdef sparc
17 #ifdef __sparc__
1818 # define DEFMAP "sunkeymap.map"
1919 # define KERNDIR "/usr/src/linux/drivers/sbus/char"
2020 #else
9797 *inptr = in;
9898 return uc;
9999 }
100
100
101 static void
102 clear_uni_entry(struct unicode_list *up) {
103 up->next = NULL;
104 up->seq = NULL;
105 up->prev = up;
106 }
101107
102108 /*
103109 * Read description of a single font position.
276282 if (fontlenp)
277283 *fontlenp = fontlen;
278284
279 if (hastable && uclistheadsp) {
285 if (!uclistheadsp)
286 return 0; /* got font, don't need unicode_list */
287
288 *uclistheadsp = xrealloc(*uclistheadsp,
289 (fontpos0+fontlen)*sizeof(struct unicode_list));
290
291 if (hastable) {
280292 char *inptr, *endptr;
281293
282294 inptr = inputbuf + ftoffset + fontlen * charsize;
283295 endptr = inputbuf + inputlth;
284
285 *uclistheadsp = xrealloc(*uclistheadsp,
286 (fontpos0+fontlen)*sizeof(struct unicode_list));
287296
288297 for (i=0; i<fontlen; i++) {
289298 k = fontpos0 + i;
294303 char *u = _("%s: Input file: trailing garbage\n");
295304 fprintf(stderr, u, progname);
296305 exit(EX_DATAERR);
306 }
307 } else {
308 for (i=0; i<fontlen; i++) {
309 k = fontpos0 + i;
310 clear_uni_entry(&(*uclistheadsp)[k]);
297311 }
298312 }
299313
277277 notable = 1;
278278 } else {
279279 for (i = 1; i < argc; i ++) {
280 if (!strcmp(argv[i], "-i") && i < argc-1)
280 if ((!strcmp(argv[i], "-i") || !strcmp(argv[i], "-if"))
281 && i < argc-1)
281282 ifname = argv[++i];
282 else if(!strcmp(argv[i], "-o") && i < argc-1)
283 else if((!strcmp(argv[i],"-o")||!strcmp(argv[i],"-of"))
284 && i < argc-1)
283285 ofname = argv[++i];
284286 else if(!strcmp(argv[i], "-it") && i < argc-1)
285287 itname = argv[++i];
231231 static void
232232 do_loadfont(int fd, char *inbuf, int unit, int hwunit, int fontsize,
233233 char *pathname) {
234 char buf[16384];
235 int i;
234 char *buf;
235 int i, buflen;
236236 int bad_video_erase_char = 0;
237237
238 memset(buf,0,sizeof(buf));
238 buflen = 32*fontsize;
239 if (buflen < 32*128) /* below we access position 32 */
240 buflen = 32*128; /* so need at least 32*33 */
241 buf = xmalloc(buflen);
242 memset(buf,0,buflen);
239243
240244 if (unit < 1 || unit > 32) {
241245 fprintf(stderr, _("Bad character size %d\n"), unit);
422426 memcpy(bigfontbuf+bigfontbuflth-fontbuflth,
423427 fontbuf, fontbuflth);
424428 }
425
426429 do_loadfont(fd, bigfontbuf, bigunit, hwunit, bigfontsize, NULL);
430
427431 if (uclistheads && !no_u)
428432 do_loadtable(fd, uclistheads, bigfontsize);
429433 }
00 #include <string.h>
11
2 #define VERSION "1.00"
2 #define VERSION "1.02"
33
44 char *progname;
55