added concrete implementations of putc(), getc(), getchar() and gets()
[tangerine.git] / rom / keymap / defaultkeymap.c
blobc2ae0cb8c48bb2145bc41bda442313cc9c26295e
1 /*
2 Copyright © 1995-2001, The AROS Development Team. All rights reserved.
3 $Id$
5 Desc:
6 Lang: english
7 */
9 #include <devices/keymap.h>
12 #undef N
13 #undef S
14 #undef A
15 #undef C
16 #undef D
17 #undef V
18 #undef ST
19 #undef NOP
21 #define N KC_NOQUAL
22 #define S KCF_SHIFT
23 #define A KCF_ALT
24 #define C KCF_CONTROL
25 #define D KCF_DEAD
26 #define V KC_VANILLA
27 #define ST KCF_STRING
28 #define NOP KCF_NOP
30 static UBYTE lokeymaptypes[] =
32 S, /* 00 */
33 S|A, /* 01 */
34 S|A, /* 02 */
35 S|A, /* 03 */
36 S|A, /* 04 */
37 S|A, /* 05 */
38 S|A, /* 06 */
39 S|A, /* 07 */
40 S|A, /* 08 */
41 S|A, /* 09 */
42 S|A, /* 0A */
43 S, /* 0B */
44 S, /* 0C */
45 S, /* 0D */
46 N, /* 0E */
47 S|A, /* 0F */
48 V, /* 10 q */
49 V, /* 11 w */
50 V, /* 12 e */
51 V, /* 13 r */
52 V, /* 14 t */
53 V, /* 15 z */
54 V, /* 16 u */
55 V, /* 17 i */
56 V, /* 18 o */
57 V, /* 19 p */
58 S|A, /* 1A */
59 S|A, /* 1B */
60 S|A, /* 1C */
61 S|A, /* 1D */
62 S|A, /* 1E */
63 S|A, /* 1F */
64 V, /* 20 a */
65 V, /* 21 s */
66 V, /* 22 d */
67 V, /* 23 f */
68 V, /* 24 g */
69 V, /* 25 h */
70 V, /* 26 j */
71 V, /* 27 k */
72 V, /* 28 l */
73 S, /* 29 */
74 S, /* 2A */
75 V, /* 2B */
76 N, /* 2C */
77 N, /* 2D */
78 N, /* 2E */
79 N, /* 2F */
80 S, /* 30 */
81 V, /* 31 y */
82 V, /* 32 x */
83 V, /* 33 c */
84 V, /* 34 v */
85 V, /* 35 b */
86 V, /* 36 n */
87 V, /* 37 m */
88 S|A, /* 38 */
89 S|A, /* 39 */
90 S, /* 3A */
91 N, /* 3B */
92 N, /* 3C */
93 N, /* 3D */
94 N, /* 3E */
95 N, /* 3F */
99 static UBYTE hikeymaptypes[] =
101 N, /* 40 SPACE */
102 N, /* 41 BACKSPACE */
103 ST|S, /* 42 TAB */
104 N, /* 43 ENTER */
105 C, /* 44 RETURN */
106 A, /* 45 ESCAPE */
107 N, /* 46 DEL */
108 ST|S, /* 47 INSERT ?? */
109 ST|S, /* 48 PAGE UP ?? */
110 ST|S, /* 49 PAGE DOWN ?? */
111 N, /* 4A NUMERIC PAD - */
112 ST|S, /* 4B F11 ?? */
113 ST|S, /* 4C CURSORUP*/
114 ST|S, /* 4D CURSORDOWN */
115 ST|S, /* 4E CURSORRIGHT */
116 ST|S, /* 4F CURSORLEFT */
117 ST|S, /* 50 F1 */
118 ST|S, /* 51 F2 */
119 ST|S, /* 52 F3 */
120 ST|S, /* 53 F4 */
121 ST|S, /* 54 F5 */
122 ST|S, /* 55 F6 */
123 ST|S, /* 56 F7 */
124 ST|S, /* 57 F8 */
125 ST|S, /* 58 F9 */
126 ST|S, /* 59 F10 */
127 S, /* 5A NUMPAD ( */
128 S, /* 5B NUMPAD ) */
129 N, /* 5C NUMPAD / */
130 N, /* 5D NUMPAD * */
131 N, /* 5E NUMPAD + */
132 ST, /* 5F HELP */
133 NOP, /* 60 LEFT SHIFT*/
134 NOP, /* 61 RIGHT SHIFT */
135 NOP, /* 62 CAPS LOCK */
136 NOP, /* 63 CONTROL */
137 NOP, /* 64 LALT */
138 NOP, /* 65 RALT */
139 NOP, /* 66 LCOMMAND */
140 NOP, /* 67 RCOMMAND */
141 NOP, /* 68 LEFT MOUSE BUTTON*/
142 NOP, /* 69 RIGHT MOUSE BUTTON */
143 NOP, /* 6A MIDDLE MOUSE BUTTON */
144 NOP, /* 6B */
145 NOP, /* 6C */
146 NOP, /* 6D */
147 ST|A, /* 6E PAUSE/BREAK ??*/
148 ST|S, /* 6F F12 ?? */
149 ST|C, /* 70 HOME ?? */
150 ST|C, /* 71 END ?? */
151 NOP, /* 72 */
152 NOP, /* 73 */
153 NOP, /* 74 */
154 NOP, /* 75 */
155 NOP, /* 76 */
156 NOP, /* 77 */
157 NOP, /* 78 */
158 NOP, /* 79 */
159 NOP, /* 7A */
160 NOP, /* 7B */
161 NOP, /* 7C */
162 NOP, /* 7D */
163 NOP, /* 7E */
164 NOP /* 7F */
168 #undef N
169 #undef S
170 #undef A
171 #undef C
172 #undef D
173 #undef V
174 #undef ST
175 #undef NOP
177 #undef STRING
178 #undef DEAD
179 #undef BYTES
181 #define STRING(x) (IPTR)x
182 #define DEAD(x) (IPTR)x
184 #define BYTES(b0, b1, b2, b3) \
185 (((UBYTE)b0)<<24) | (((UBYTE)b1)<<16) | (((UBYTE)b2)<<8) | (((UBYTE)b3)<<0)
187 static IPTR lokeymap[] =
189 BYTES('~', '`', '~', '`'), /* 00 Left of 1 Key */
190 BYTES(0xB9, 0xA1, '!', '1'), /* 01 1 */
191 BYTES(0xB2, '@', '@', '2'), /* 02 2 */
192 BYTES(0xB3, 0xA3, '#', '3'), /* 03 3 */
193 BYTES(0xBC, 0xA4, '$', '4'), /* 04 4 */
194 BYTES(0xBD, 0xBD, '%', '5'), /* 05 5 */
195 BYTES(0xBE, 0xBE, '^', '6'), /* 06 6 */
196 BYTES(0xF7, '{', '&', '7'), /* 07 7 */
197 BYTES('[', '[', '*', '8'), /* 08 8 */
198 BYTES(']', ']', '(', '9'), /* 09 9 */
199 BYTES('}', '}', ')', '0'), /* 0A 0 */
200 BYTES('_', '-', '_', '-'), /* 0B Right of 0 */
201 BYTES('+', '=', '+', '='), /* 0C 2nd right of 0 */
202 BYTES('|', '\\', '|', '\\'), /* 0D 3rd right of 0 */
203 BYTES(0, 0, 0, 0), /* 0E undefined */
204 BYTES('0', '0', '0', '0'), /* 0F NUM 0 */
205 BYTES('Q', 'q', 'Q', 'q'), /* 10 */
206 BYTES('W', 'w', 'W', 'w'), /* 11 */
207 BYTES('E', 'e', 'E', 'e'), /* 12 */
208 BYTES('R', 'r', 'R', 'r'), /* 13 */
209 BYTES('T', 't', 'T', 't'), /* 14 */
210 BYTES('Y', 'y', 'Y', 'y'), /* 15 */
211 BYTES('U', 'u', 'U', 'u'), /* 16 */
212 BYTES('I', 'i', 'I', 'i'), /* 17 */
213 BYTES('O', 'o', 'O', 'o'), /* 18 */
214 BYTES('P', 'p', 'P', 'p'), /* 19 */
216 BYTES('{', '[', '{', '['), /* 1A */
217 BYTES('}', ']', '}', ']'), /* 1B */
218 BYTES(0, 0, 0, 0), /* 1C undefined */
219 BYTES('1', '1', '1', '1'), /* 1D NUM 1*/
220 BYTES('2', '2', '2', '2'), /* 1E NUM 2*/
221 BYTES('3', '3', '3', '3'), /* 1F NUM 3*/
223 BYTES('A', 'a', 'A', 'a'), /* 20 */
224 BYTES('S', 's', 'S', 's'), /* 21 */
225 BYTES('D', 'd', 'D', 'd'), /* 22 */
226 BYTES('F', 'f', 'F', 'f'), /* 23 */
227 BYTES('G', 'g', 'G', 'g'), /* 24 */
228 BYTES('H', 'h', 'H', 'h'), /* 25 */
229 BYTES('J', 'j', 'J', 'j'), /* 26 */
230 BYTES('K', 'k', 'K', 'k'), /* 27 */
231 BYTES('L', 'l', 'L', 'l'), /* 28 */
233 BYTES(':', ';', ':', ';'), /* 29 */
234 BYTES('"', 0x27, '"', 0x27), /* 2A */
235 BYTES('|', '\\', '|', '\\'), /* 2B */
236 BYTES(0, 0, 0, 0), /* 2C undefined */
237 BYTES('4', '4', '4', '4'), /* 2D NUM 4 */
238 BYTES('5', '5', '5', '5'), /* 2E NUM 5 */
239 BYTES('6', '6', '6', '6'), /* 2F NUM 6 */
240 BYTES('>', '<', '>', '<'), /* 30 */
242 BYTES('Z', 'z', 'Z', 'z'), /* 31 */
243 BYTES('X', 'x', 'X', 'x'), /* 32 */
244 BYTES('C', 'c', 'C', 'c'), /* 33 */
245 BYTES('V', 'v', 'V', 'v'), /* 34 */
246 BYTES('B', 'b', 'B', 'b'), /* 35 */
247 BYTES('N', 'n', 'N', 'n'), /* 36 */
248 BYTES('M', 'm', 'M', 'm'), /* 37 */
250 BYTES('<', ',', '<', ','), /* 38 */
251 BYTES('>', '.', '>', '.'), /* 39 */
252 BYTES('?', '/', '?', '/'), /* 3A */
253 BYTES(0, 0, 0, 0), /* 3B */
254 BYTES('.', '.', '.', '.'), /* 3C NUM . */
255 BYTES('7', '7', '7', '7'), /* 3D NUM 7 */
256 BYTES('8', '8', '8', '8'), /* 3E NUM 8 */
257 BYTES('9', '9', '9', '9'), /* 3F NUM 9 */
260 /* Strings for the F1 key. In a real AmigaOS keymap, these would have come after
261 ** the HiKeyMap, but we do it this way to avoid prototyping
263 ** String descriptors are byte arrays and work like this:
265 ** sizeofstring,offset_from_start_array_to_start_of_string
266 ** sizeofstring,offset_from_start_array_to_start_of_string
267 ** ..
268 ** ..
269 ** string1
270 ** string2
271 ** ..
272 ** ..
274 ** The number of strings depends on the qualifier flags
275 ** set in the keymap type.
278 UBYTE f1_descr[] =
280 3,4,
281 4,7,
283 0x9B,'0','~',
284 0x9B,'1','0','~'
287 UBYTE f2_descr[] =
289 3,4,
290 4,7,
292 0x9B,'1','~',
293 0x9B,'1','1','~'
296 UBYTE f3_descr[] =
298 3,4,
299 4,7,
301 0x9B,'2','~',
302 0x9B,'1','2','~'
305 UBYTE f4_descr[] =
307 3,4,
308 4,7,
310 0x9B,'3','~',
311 0x9B,'1','3','~'
314 UBYTE f5_descr[] =
316 3,4,
317 4,7,
319 0x9B,'4','~',
320 0x9B,'1','4','~'
323 UBYTE f6_descr[] =
325 3,4,
326 4,7,
328 0x9B,'5','~',
329 0x9B,'1','5','~'
332 UBYTE f7_descr[] =
334 3,4,
335 4,7,
337 0x9B,'6','~',
338 0x9B,'1','6','~'
341 UBYTE f8_descr[] =
343 3,4,
344 4,7,
346 0x9B,'7','~',
347 0x9B,'1','7','~'
350 UBYTE f9_descr[] =
352 3,4,
353 4,7,
355 0x9B,'8','~',
356 0x9B,'1','8','~'
359 UBYTE f10_descr[] =
361 3,4,
362 4,7,
364 0x9B,'9','~',
365 0x9B,'1','9','~'
368 UBYTE f11_descr[] =
370 4,4,
371 4,8,
373 0x9B,'2','0','~',
374 0x9B,'3','0','~'
377 UBYTE f12_descr[] =
379 4,4,
380 4,8,
382 0x9B,'2','1','~',
383 0x9B,'3','1','~'
386 UBYTE insert_descr[] =
388 4,4,
389 4,8,
391 0x9B,'4','0','~',
392 0x9B,'5','0','~'
395 UBYTE pageup_descr[] =
397 4,4,
398 4,8,
400 0x9B,'4','1','~',
401 0x9B,'5','1','~'
404 UBYTE pagedown_descr[] =
406 4,4,
407 4,8,
409 0x9B,'4','2','~',
410 0x9B,'5','2','~'
413 UBYTE pausebreak_descr[] =
415 4,4,
416 4,8,
418 0x9B,'4','3','~',
419 0x9B,'5','3','~'
422 UBYTE home_descr[] =
424 4,4,
425 4,8,
427 0x9B,'4','4','~',
428 0x9B,'5','4','~'
431 UBYTE end_descr[] =
433 4,4,
434 4,8,
436 0x9B,'4','5','~',
437 0x9B,'5','5','~'
440 UBYTE up_descr[] =
442 2,4,
443 2,6,
445 0x9B,'A',
446 0x9B,'T'
449 UBYTE down_descr[] =
451 2,4,
452 2,6,
454 0x9B,'B',
455 0x9B,'S'
458 UBYTE left_descr[] =
460 2,4,
461 3,6,
463 0x9B,'D',
464 0x9B,' ','A'
467 UBYTE right_descr[] =
469 2,4,
470 3,6,
472 0x9B,'C',
473 0x9B,' ','@'
476 UBYTE tab_descr[] =
478 1,4,
479 2,5,
481 0x9,
482 0x9B,'Z'
485 UBYTE help_descr[] =
487 3,2,
489 0x9B,'?','~'
492 static IPTR hikeymap[] =
494 BYTES(' ', ' ', ' ', ' '), /* 40 */
495 BYTES(8, 8, 8, 8), /* 41 BACKSPACE*/
496 STRING(tab_descr), /* 42 TAB */
497 BYTES(13, 13, 13, 13), /* 43 ENTER */
498 BYTES(0, 0, 10, 13), /* 44 RETURN */
499 BYTES(0, 0, 0x9B, 27), /* 45 ESCAPE */
500 BYTES(127, 127, 127, 127), /* 46 DEL */
501 STRING(insert_descr), /* 47 INSERT ?? */
502 STRING(pageup_descr), /* 48 PAGEUP ?? */
503 STRING(pagedown_descr), /* 49 PAGEDOWN ?? */
504 BYTES('-', '-', '-', '-'), /* 4A NUMPAD - */
505 STRING(f11_descr), /* 4B F11 ?? */
506 STRING(up_descr), /* 4C CURSOR UP*/
507 STRING(down_descr), /* 4D CURSOR DOWN*/
508 STRING(right_descr), /* 4E CURSOR RIGHT */
509 STRING(left_descr), /* 4F CURSOR LEFT */
510 STRING(f1_descr), /* 50 F1 */
511 STRING(f2_descr), /* 51 */
512 STRING(f3_descr), /* 52 */
513 STRING(f4_descr), /* 53 */
514 STRING(f5_descr), /* 54 */
515 STRING(f6_descr), /* 55 */
516 STRING(f7_descr), /* 56 */
517 STRING(f8_descr), /* 57 */
518 STRING(f9_descr), /* 58 */
519 STRING(f10_descr), /* 59 */
520 BYTES('[', '(', '[', '('), /* 5A */
521 BYTES(']', ')', ']', ')'), /* 5B */
522 BYTES('/', '/', '/', '/'), /* 5C */
523 BYTES('*', '*', '*', '*'), /* 5D */
524 BYTES('+', '+', '+', '+'), /* 5E */
525 STRING(help_descr), /* 5F HELP */
526 BYTES(0, 0, 0, 0), /* 60 */
527 BYTES(0, 0, 0, 0), /* 61 */
528 BYTES(0, 0, 0, 0), /* 62 */
529 BYTES(0, 0, 0, 0), /* 63 */
530 BYTES(0, 0, 0, 0), /* 64 */
531 BYTES(0, 0, 0, 0), /* 65 */
532 BYTES(0, 0, 0, 0), /* 66 */
533 BYTES(0, 0, 0, 0), /* 67 */
534 BYTES(0, 0, 0, 0), /* 68 */
535 BYTES(0, 0, 0, 0), /* 69 */
536 BYTES(0, 0, 0, 0), /* 6A */
537 BYTES(0, 0, 0, 0), /* 6B */
538 BYTES(0, 0, 0, 0), /* 6C */
539 BYTES(0, 0, 0, 0), /* 6D */
540 STRING(pausebreak_descr), /* 6E PAUSE/BREAK ?? */
541 STRING(f12_descr), /* 6F F12 ?? */
542 STRING(home_descr), /* 70 HOME ?? */
543 STRING(end_descr), /* 71 END ?? */
544 BYTES(0, 0, 0, 0), /* 72 */
545 BYTES(0, 0, 0, 0), /* 73 */
546 BYTES(0, 0, 0, 0), /* 74 */
547 BYTES(0, 0, 0, 0), /* 75 */
548 BYTES(0, 0, 0, 0), /* 76 */
549 BYTES(0, 0, 0, 0), /* 77 */
550 BYTES(0, 0, 0, 0), /* 78 */
551 BYTES(0, 0, 0, 0), /* 79 */
552 BYTES(0, 0, 0, 0), /* 7A */
553 BYTES(0, 0, 0, 0), /* 7B */
554 BYTES(0, 0, 0, 0), /* 7C */
555 BYTES(0, 0, 0, 0), /* 7D */
556 BYTES(0, 0, 0, 0), /* 7E */
557 BYTES(0, 0, 0, 0), /* 7F */
560 #undef SETBITS
562 #define SETBITS(b0, b1, b2, b3, b4, b5, b6, b7) \
563 (b0<<0)|(b1<<1)|(b2<<2)|(b3<<3)|(b4<<4)|(b5<<5)|(b6<<6)|(b7<<7)
565 static UBYTE locapsable[] =
567 SETBITS(0, 0, 0, 0, 0, 0, 0, 0), /* 00 - 07 */
568 SETBITS(0, 0, 0, 0, 0, 0, 0, 0), /* 08 - 0F */
570 SETBITS(1, 1, 1, 1, 1, 1, 1, 1), /* 10 - 17 */
571 SETBITS(1, 1, 0, 0, 0, 0, 0, 0), /* 18 - 1F */
573 SETBITS(1, 1, 1, 1, 1, 1, 1, 1), /* 20 - 27 */
574 SETBITS(1, 0, 0, 0, 0, 0, 0, 0), /* 28 - 2F */
576 SETBITS(0, 1, 1, 1, 1, 1, 1, 1), /* 30 - 37 */
577 SETBITS(0, 0, 0, 0, 0, 0, 0, 0) /* 38 - 3F */
580 static UBYTE hicapsable[] =
582 SETBITS(0, 0, 0, 0, 0, 0, 0, 0), /* 40 - 47 */
583 SETBITS(0, 0, 0, 0, 0, 0, 0, 0), /* 48 - 4F */
585 SETBITS(0, 0, 0, 0, 0, 0, 0, 0), /* 50 - 57 */
586 SETBITS(0, 0, 0, 0, 0, 0, 0, 0), /* 58 - 5F */
588 SETBITS(0, 0, 0, 0, 0, 0, 0, 0), /* 60 - 67 */
589 SETBITS(0, 0, 0, 0, 0, 0, 0, 0), /* 68 - 6F */
591 SETBITS(0, 0, 0, 0, 0, 0, 0, 0), /* 70 - 77 */
592 SETBITS(0, 0, 0, 0, 0, 0, 0, 0) /* 78 - 7F */
595 static UBYTE lorepeatable[] =
597 SETBITS(1, 1, 1, 1, 1, 1, 1, 1), /* 00 - 07 */
598 SETBITS(1, 1, 1, 1, 1, 1, 0, 1), /* 08 - 0F */
600 SETBITS(1, 1, 1, 1, 1, 1, 1, 1), /* 10 - 17 */
601 SETBITS(1, 1, 1, 1, 0, 1, 1, 1), /* 18 - 1F */
603 SETBITS(1, 1, 1, 1, 1, 1, 1, 1), /* 20 - 27 */
604 SETBITS(1, 1, 1, 1, 0, 1, 1, 1), /* 28 - 2F */
606 SETBITS(1, 1, 1, 1, 1, 1, 1, 1), /* 30 - 37 */
607 SETBITS(1, 1, 1, 0, 1, 1, 1, 1) /* 38 - 3F */
610 static UBYTE hirepeatable[] =
612 SETBITS(1, 1, 1, 0, 0, 0, 1, 0), /* 40 - 47 */
613 SETBITS(1, 1, 0, 0, 1, 1, 1, 1), /* 48 - 4F */
615 SETBITS(0, 0, 0, 0, 0, 0, 0, 0), /* 50 - 57 */
616 SETBITS(0, 0, 1, 1, 1, 1, 1, 0), /* 58 - 5F */
618 SETBITS(0, 0, 0, 0, 0, 0, 0, 0), /* 60 - 67 */
619 SETBITS(0, 0, 0, 0, 0, 0, 0, 0), /* 68 - 6F */
621 SETBITS(0, 0, 0, 0, 0, 0, 0, 0), /* 70 - 77 */
622 SETBITS(0, 0, 0, 0, 0, 0, 0, 0) /* 78 - 7F */
625 struct KeyMap def_km =
627 lokeymaptypes,
628 lokeymap,
629 locapsable,
630 lorepeatable,
632 hikeymaptypes,
633 hikeymap,
634 hicapsable,
635 hirepeatable
638 /* index vertically: (keytype & KC_VANILLA)
639 ** index horizontally: KCF_xxx qualifier combination for keypress.
640 ** Which is used to get the index of the byte describing the keypress.
641 ** X means invalid key.
642 ** S means Ctrl-c alike combination (clear bits 5 and 6)
644 #undef X /* undefined */
645 #undef S /* Ctrl-c like combo */
646 #define X (-1)
647 #define S (-2)
649 #if 1
651 /* stegerg: on the Amiga you get a key event if you
652 press for example CONTROL + A, even if
653 the keymaptype for that key has not set
654 KCF_CONTROL. So it looks like if for a
655 certain keypress some qualifiers are set
656 which are not set in the keymap-type then
657 this qualifiers are simply to be ignored
660 const BYTE keymaptype_table[8][8] =
662 {3, 3, 3, 3, 3, 3, 3, 3}, /* KCF_NOQUAL == 0 */
663 {3, 2, 3, 2, 3, 2, 3, 2}, /* KCF_SHIFT == 1 */
664 {3, 3, 2, 2, 3, 3, 2, 2}, /* KCF_ALT == 2 */
665 {3, 2, 1, 0, 3, 2, 1, 0}, /* KCF_SHIFT|KCF_ALT == 3 */
666 {3, 3, 3, 3, 2, 2, 2, 2}, /* KCF_CONTROL == 4 */
667 {3, 2, 3, 2, 1, 0, 1, 0}, /* KCF_SHIFT|KCF_CONTROL == 5 */
668 {3, 3, 2, 2, 1, 1, 0, 0}, /* KCF_ALT|KCF_CONTROL == 6 */
669 {3, 2, 1, 0, S, X, X, X} /* KCF_SHIFT|KCF_ALT|KCF_CONTROL == KC__VANILLA == 7 */
673 #else
675 const BYTE keymaptype_table[8][8] =
677 {3, X, X, X, X, X, X, X}, /* KCF_NOQUAL == 0 */
678 {3, 2, X, X, X, X, X, X}, /* KCF_SHIFT == 1 */
679 {3, X, 2, X, X, X, X, X}, /* KCF_ALT == 2 */
680 {3, 2, 1, 0, X, X, X, X}, /* KCF_SHIFT|KCF_ALT == 3 */
681 {3, X, X, X, 2, X, X, X}, /* KCF_CONTROL == 4 */
682 {3, 2, X, X, 1, 0, X, X}, /* KCF_SHIFT|KCF_CONTROL == 5 */
683 {3, X, 2, X, 1, X, 0, X}, /* KCF_ALT|KCF_CONTROL == 6 */
684 {3, 2, 1, 0, S, X, X, X} /* KCF_SHIFT|KCF_ALT|KCF_CONTROL == KC__VANILLA == 7 */
687 #endif
689 #undef S
691 /* index vertically: (keytype & KC_VANILLA)
692 ** index horizontally: KCF_xxx qualifier combination for keypress.
693 ** Used to get the number of the string descriptor,
694 ** depending on the KCF_SHIFT, KCF_ALT and KCF_CONTROL qualifiers
695 ** of the key pressed
698 #if 1
700 /* stegerg: see comment before keymaptype_table */
702 const BYTE keymapstr_table[8][8] =
704 {0, 0, 0, 0, 0, 0, 0, 0}, /* KCF_NOQUAL == 0 */
705 {0, 1, 0, 1, 0, 1, 0, 1}, /* KCF_SHIFT == 1 */
706 {0, 0, 1, 1, 0, 0, 1, 1}, /* KCF_ALT == 2 */
707 {0, 1, 2, 3, 0, 1, 2, 3}, /* KCF_SHIFT|KCF_ALT == 3 */
708 {0, 0, 0, 0, 1, 1, 1, 1}, /* KCF_CONTROL == 4 */
709 {0, 1, 0, 1, 2, 3, 2, 3}, /* KCF_SHIFT|KCF_CONTROL == 5 */
710 {0, 0, 1, 1, 2, 2, 3, 3}, /* KCF_ALT|KCF_CONTROL == 6 */
711 {0, 1, 2, 3, 4, 5, 6, 7} /* KCF_SHIFT|KCF_ALT|KCF_CONTROL == KC__VANILLA == 7 */
714 #else
715 const BYTE keymapstr_table[8][8] =
717 {0, X, X, X, X, X, X, X}, /* KCF_NOQUAL == 0 */
718 {0, 1, X, X, X, X, X, X}, /* KCF_SHIFT == 1 */
719 {0, X, 1, X, X, X, X, X}, /* KCF_ALT == 2 */
720 {0, 1, 2, 3, X, X, X, X}, /* KCF_SHIFT|KCF_ALT == 3 */
721 {0, X, X, X, 1, X, X, X}, /* KCF_CONTROL == 4 */
722 {0, 1, X, X, 2, 3, X, X}, /* KCF_SHIFT|KCF_CONTROL == 5 */
723 {0, X, 1, X, 2, X, 3, X}, /* KCF_ALT|KCF_CONTROL == 6 */
724 {0, 1, 2, 3, 4, 5, 6, 7} /* KCF_SHIFT|KCF_ALT|KCF_CONTROL == KC__VANILLA == 7 */
727 #endif
730 #undef X