1keytables(4) File Formats keytables(4)
2
3
4
6 keytables - keyboard table descriptions for loadkeys and dumpkeys
7
9 These files are used by loadkeys(1) to modify the translation tables
10 used by the keyboard streams module and generated from those transla‐
11 tion tables. See loadkeys(1).
12
13
14 Any line in the file beginning with # is a comment, and is ignored. #
15 is treated specially only at the beginning of a line.
16
17
18 Other lines specify the values to load into the tables for a particular
19 keystation. The format is either:
20
21 key number list_of_entries
22
23
24
25
26 or
27
28 swap number1 with number2
29
30
31
32
33 or
34
35 key number1 same as number2
36
37
38
39
40 or a blank line, which is ignored.
41
42 key number list_of_entries
43
44
45
46
47 sets the entries for keystation number from the list given. An entry
48 in that list is of the form
49
50 tablename code
51
52
53
54
55 where tablename is the name of a particular translation table, or all.
56 The translation tables are:
57
58 base entry when no shifts are active
59
60
61 shift entry when "Shift" key is down
62
63
64 caps entry when "Caps Lock" is in effect
65
66
67 ctrl entry when "Control" is down
68
69
70 altg entry when "Alt Graph" is down
71
72
73 numl entry when "Num Lock" is in effect
74
75
76 up entry when a key goes up
77
78
79
80 All tables other than up refer to the action generated when a key goes
81 down. Entries in the up table are used only for shift keys, since the
82 shift in question goes away when the key goes up, except for keys such
83 as "Caps Lock" or "Num Lock"; the keyboard streams module makes the key
84 look as if it were a latching key.
85
86
87 A table name of all indicates that the entry for all tables should be
88 set to the specified value, with the following exception: for entries
89 with a value other than hole, the entry for the numl table should be
90 set to nonl, and the entry for the up table should be set to nop.
91
92
93 The code specifies the effect of the key in question when the specified
94 shift key is down. A code consists of either:
95
96 o A character, which indicates that the key should generate
97 the given character. The character can either be a single
98 character, a single character preceded by ^ which refers to
99 a "control character" (for instance, ^c is control-C), or a
100 C-style character constant enclosed in single quote charac‐
101 ters ('), which can be expressed with C-style escape
102 sequences such as \r for RETURN or \000 for the null charac‐
103 ter. Note that the single character may be any character in
104 an 8-bit character set, such as ISO 8859/1.
105
106 o A string, consisting of a list of characters enclosed in
107 double quote characters ("). Note that the use of the double
108 quote character means that a code of double quote must be
109 enclosed in single quotes.
110
111 o One of the following expressions:
112
113
114 shiftkeys+leftshift
115
116 the key is to be the left-hand "Shift" key
117
118
119 shiftkeys+rightshift
120
121 the key is to be the right-hand "Shift" key
122
123
124 shiftkeys+leftctrl
125
126 the key is to be the left-hand "Control" key
127
128
129 shiftkeys+rightctrl
130
131 the key is to be the right-hand "Control" key
132
133
134 shiftkeys+alt
135
136 the key is to be the "Alt" shift key
137
138
139 shiftkeys+altgraph
140
141 the key is to be the "Alt Graph" shift key
142
143
144 shiftkeys+capslock
145
146 the key is to be the "Caps Lock" key
147
148
149 shiftkeys+shiftlock
150
151 the key is to be the "Shift Lock" key
152
153
154 shiftkeys+numlock
155
156 the key is to be the "Num Lock" key
157
158
159 buckybits+systembit
160
161 the key is to be the "Stop" key in SunView; this is nor‐
162 mally the L1 key, or the SETUP key on the VT100 keyboard
163
164
165 buckybits+metabit
166
167 the key is to be the "meta" key. That is, the "Left" or
168 "Right" key on a Sun-2 or Sun-3 keyboard or the "dia‐
169 mond" key on a Sun-4 keyboard
170
171
172 compose
173
174 the key is to be the "Compose" key
175
176
177 ctrlq
178
179 on the "VT100" keyboard, the key is to transmit the con‐
180 trol-Q character (this would be the entry for the "Q"
181 key in the ctrl table)
182
183
184 ctrls
185
186 on the "VT100" keyboard, the key is to transmit the con‐
187 trol-S character (this would be the entry for the "S"
188 key in the ctrl table)
189
190
191 noscroll
192
193 on the "VT100" keyboard, the key is to be the "No
194 Scroll" key
195
196
197 string+uparrow
198
199 the key is to be the "up arrow" key
200
201
202 string+downarrow
203
204 the key is to be the "down arrow" key
205
206
207 string+leftarrow
208
209 the key is to be the "left arrow" key
210
211
212 string+rightarrow
213
214 the key is to be the "right arrow" key
215
216
217 string+homearrow
218
219 the key is to be the "home" key
220
221
222 fa_acute
223
224 the key is to be the acute accent "floating accent" key
225
226
227 fa_cedilla
228
229 the key is to be the cedilla "floating accent" key
230
231
232 fa_cflex
233
234 the key is to be the circumflex "floating accent" key
235
236
237 fa_grave
238
239 the key is to be the grave accent "floating accent" key
240
241
242 fa_tilde
243
244 the key is to be the tilde "floating accent" key
245
246
247 fa_umlaut
248
249 the key is to be the umlaut "floating accent" key
250
251
252 nonl
253
254 this is used only in the Num Lock table; the key is not
255 to be affected by the state of Num Lock
256
257
258 pad0
259
260 the key is to be the "0" key on the numeric keypad
261
262
263 pad1
264
265 the key is to be the "1" key on the numeric keypad
266
267
268 pad2
269
270 the key is to be the "2" key on the numeric keypad
271
272
273 pad3
274
275 the key is to be the "3" key on the numeric keypad
276
277
278 pad4
279
280 the key is to be the "4" key on the numeric keypad
281
282
283 pad5
284
285 the key is to be the "5" key on the numeric keypad
286
287
288 pad6
289
290 the key is to be the "6" key on the numeric keypad
291
292
293 pad7
294
295 the key is to be the "7" key on the numeric keypad
296
297
298 pad8
299
300 the key is to be the "8" key on the numeric keypad
301
302
303 pad9
304
305 the key is to be the "9" key on the numeric keypad
306
307
308 paddot
309
310 the key is to be the "." key on the numeric keypad
311
312
313 padenter
314
315 the key is to be the "Enter" key on the numeric keypad
316
317
318 padplus
319
320 the key is to be the "+" key on the numeric keypad
321
322
323 padminus
324
325 the key is to be the "−" key on the numeric keypad
326
327
328 padstar
329
330 the key is to be the "*" key on the numeric keypad
331
332
333 padslash
334
335 the key is to be the "/" key on the numeric keypad
336
337
338 padequal
339
340 the key is to be the "=" key on the numeric keypad
341
342
343 padsep
344
345 the key is to be the "," (separator) key on the numeric
346 keypad
347
348
349 lf(n)
350
351 the key is to be the left-hand function key n
352
353
354 rf(n)
355
356 the key is to be the right-hand function key n
357
358
359 tf(n)
360
361 the key is to be the top function key n
362
363
364 bf(n)
365
366 the key is to be the "bottom" function key n
367
368
369 nop
370
371 the key is to do nothing
372
373
374 error
375
376 this code indicates an internal error; to be used only
377 for keystation 126, and must be used there
378
379
380 idle
381
382 this code indicates that the keyboard is idle (that is,
383 has no keys down); to be used only for all entries other
384 than the numl and up table entries for keystation 127,
385 and must be used there
386
387
388 oops
389
390 this key exists, but its action is not defined; it has
391 the same effect as nop
392
393
394 reset
395
396 this code indicates that the keyboard has just been
397 reset; to be used only for the up table entry for
398 keystation 127, and must be used there.
399
400
401 swap number1 with number2
402
403 exchanges the entries for keystations number1 and num‐
404 ber2.
405
406
407 key number1 same as number2
408
409 sets the entries for keystation number1 to be the same
410 as those for keystation number2. If the file does not
411 specify entries for keystation number2, the entries cur‐
412 rently in the translation table are used; if the file
413 does specify entries for keystation number2, those
414 entries are used.
415
416
417
419 Example 1 Example of setting multiple keystations.
420
421
422 The following entry sets keystation 15 to be a "hole" (that is, an
423 entry indicating that there is no keystation 15); sets keystation 30 to
424 do nothing when Alt Graph is down, generate "!" when Shift is down, and
425 generate "1" under all other circumstances; and sets keystation 76 to
426 be the left-hand Control key.
427
428
429 key 15 all hole
430 key 30 base 1 shift ! caps 1 ctrl 1 altg nop
431 key 76 all shiftkeys+leftctrl up shiftkeys+leftctrl
432
433
434
435 Example 2 Exchange DELETE and BACKSPACE keys
436
437
438 The following entry exchanges the Delete and Back Space keys on the
439 Type 4 keyboard:
440
441
442 swap 43 with 66
443
444
445
446
447 Keystation 43 is normally the Back Space key, and keystation 66 is nor‐
448 mally the Delete key.
449
450
451 Example 3 Disable CAPS LOCK key
452
453
454 The following entry disables the Caps Lock key on the Type 3 and U.S.
455 Type 4 keyboards:
456
457
458 key 119 all nop
459
460
461
462 Example 4 Standard translation tables for the U.S. Type 4 keyboard
463
464
465 The following specifies the standard translation tables for the U.S.
466 Type 4 keyboard:
467
468
469 key 0 all hole
470 key 1 all buckybits+systembit up buckybits+systembit
471 key 2 all hole
472 key 3 all lf(2)
473 key 4 all hole
474 key 5 all tf(1)
475 key 6 all tf(2)
476 key 7 all tf(10)
477 key 8 all tf(3)
478 key 9 all tf(11)
479 key 10 all tf(4)
480 key 11 all tf(12)
481 key 12 all tf(5)
482 key 13 all shiftkeys+altgraph up shiftkeys+altgraph
483 key 14 all tf(6)
484 key 15 all hole
485 key 16 all tf(7)
486 key 17 all tf(8)
487 key 18 all tf(9)
488 key 19 all shiftkeys+alt up shiftkeys+alt
489 key 20 all hole
490 key 21 all rf(1)
491 key 22 all rf(2)
492 key 23 all rf(3)
493 key 24 all hole
494 key 25 all lf(3)
495 key 26 all lf(4)
496 key 27 all hole
497 key 28 all hole
498 key 29 all ^[
499 key 30 base 1 shift ! caps 1 ctrl 1 altg nop
500 key 31 base 2 shift @ caps 2 ctrl ^@ altg nop
501 key 32 base 3 shift # caps 3 ctrl 3 altg nop
502 key 33 base 4 shift $ caps 4 ctrl 4 altg nop
503 key 34 base 5 shift % caps 5 ctrl 5 altg nop
504 key 35 base 6 shift ^ caps 6 ctrl ^^ altg nop
505 key 36 base 7 shift & caps 7 ctrl 7 altg nop
506 key 37 base 8 shift * caps 8 ctrl 8 altg nop
507 key 38 base 9 shift ( caps 9 ctrl 9 altg nop
508 key 39 base 0 shift ) caps 0 ctrl 0 altg nop
509 key 40 base - shift _ caps - ctrl ^_ altg nop
510 key 41 base = shift + caps = ctrl = altg nop
511 key 42 base ` shift ~ caps ` ctrl ^^ altg nop
512 key 43 all '\b'
513 key 44 all hole
514 key 45 all rf(4) numl padequal
515 key 46 all rf(5) numl padslash
516 key 47 all rf(6) numl padstar
517 key 48 all bf(13)
518 key 49 all lf(5)
519 key 50 all bf(10) numl padequal
520 key 51 all lf(6)
521 key 52 all hole
522 key 53 all '\t'
523 key 54 base q shift Q caps Q ctrl ^Q altg nop
524 key 55 base w shift W caps W ctrl ^W altg nop
525 key 56 base e shift E caps E ctrl ^E altg nop
526 key 57 base r shift R caps R ctrl ^R altg nop
527 key 58 base t shift T caps T ctrl ^T altg nop
528 key 59 base y shift Y caps Y ctrl ^Y altg nop
529 key 60 base u shift U caps U ctrl ^U altg nop
530 key 61 base i shift I caps I ctrl '\t' altg nop
531 key 62 base o shift O caps O ctrl ^O altg nop
532 key 63 base p shift P caps P ctrl ^P altg nop
533 key 64 base [ shift { caps [ ctrl ^[ altg nop
534 key 65 base ] shift } caps ] ctrl ^] altg nop
535 key 66 all '\177'
536 key 67 all compose
537 key 68 all rf(7) numl pad7
538 key 69 all rf(8) numl pad8
539 key 70 all rf(9) numl pad9
540 key 71 all bf(15) numl padminus
541 key 72 all lf(7)
542 key 73 all lf(8)
543 key 74 all hole
544 key 75 all hole
545 key 76 all shiftkeys+leftctrl up shiftkeys+leftctrl
546 key 77 base a shift A caps A ctrl ^A altg nop
547 key 78 base s shift S caps S ctrl ^S altg nop
548 key 79 base d shift D caps D ctrl ^D altg nop
549 key 80 base f shift F caps F ctrl ^F altg nop
550 key 81 base g shift G caps G ctrl ^G altg nop
551 key 82 base h shift H caps H ctrl '\b' altg nop
552 key 83 base j shift J caps J ctrl '\n' altg nop
553 key 84 base k shift K caps K ctrl '\v' altg nop
554 key 85 base l shift L caps L ctrl ^L altg nop
555 key 86 base ; shift : caps ; ctrl ; altg nop
556 key 87 base '\'' shift '"' caps '\'' ctrl '\'' altg nop
557 key 88 base '\\' shift | caps '\\' ctrl ^\ altg nop
558 key 89 all '\r'
559 key 90 all bf(11) numl padenter
560 key 91 all rf(10) numl pad4
561 key 92 all rf(11) numl pad5
562 key 93 all rf(12) numl pad6
563 key 94 all bf(8) numl pad0
564 key 95 all lf(9)
565 key 96 all hole
566 key 97 all lf(10)
567 key 98 all shiftkeys+numlock
568 key 99 all shiftkeys+leftshift up shiftkeys+leftshift
569 key 100 base z shift Z caps Z ctrl ^Z altg nop
570 key 101 base x shift X caps X ctrl ^X altg nop
571 key 102 base c shift C caps C ctrl ^C altg nop
572 key 103 base v shift V caps V ctrl ^V altg nop
573 key 104 base b shift B caps B ctrl ^B altg nop
574 key 105 base n shift N caps N ctrl ^N altg nop
575 key 106 base m shift M caps M ctrl '\r' altg nop
576 key 107 base , shift < caps , ctrl , altg nop
577 key 108 base . shift > caps . ctrl . altg nop
578 key 109 base / shift ? caps / ctrl ^_ altg nop
579 key 110 all shiftkeys+rightshift up shiftkeys+rightshift
580 key 111 all '\n'
581 key 112 all rf(13) numl pad1
582 key 113 all rf(14) numl pad2
583 key 114 all rf(15) numl pad3
584 key 115 all hole
585 key 116 all hole
586 key 117 all hole
587 key 118 all lf(16)
588 key 119 all shiftkeys+capslock
589 key 120 all buckybits+metabit up buckybits+metabit
590 key 121 base ' ' shift ' ' caps ' ' ctrl ^@ altg ' '
591 key 122 all buckybits+metabit up buckybits+metabit
592 key 123 all hole
593 key 124 all hole
594 key 125 all bf(14) numl padplus
595 key 126 all error numl error up hole
596 key 127 all idle numl idle up reset
597
598
599
601 loadkeys(1)
602
603
604
605SunOS 5.11 18 Feb 2003 keytables(4)