added concrete implementations of putc(), getc(), getchar() and gets()
[tangerine.git] / workbench / devs / keymaps / pc105_po.c
blobd79e41882d582e725db060743aaeba2021e778f1
1 /*
2 Copyright © 1995-2006, The AROS Development Team. All rights reserved.
3 $Id$
5 Desc: Portuguese PC105 Keymap
6 Lang: English
7 */
9 #include <devices/keymap.h>
11 STATIC char keymapname[] = "pc105_po";
13 STATIC CONST UBYTE lokeymaptypes[];
14 STATIC CONST IPTR lokeymap[];
15 STATIC CONST UBYTE locapsable[];
16 STATIC CONST UBYTE lorepeatable[];
18 STATIC CONST UBYTE hikeymaptypes[];
19 STATIC CONST IPTR hikeymap[];
20 STATIC CONST UBYTE hicapsable[];
21 STATIC CONST UBYTE hirepeatable[];
23 CONST struct KeyMapNode km =
25 #if (AROS_FLAVOUR & AROS_FLAVOUR_BINCOMPAT)
27 NULL, NULL, 0, 0, keymapname
29 #else
31 NULL, NULL, keymapname, 0, 0
33 #endif
35 (UBYTE *)lokeymaptypes,
36 (IPTR *)lokeymap,
37 (UBYTE *)locapsable,
38 (UBYTE *)lorepeatable,
39 (UBYTE *)hikeymaptypes,
40 (IPTR *)hikeymap,
41 (UBYTE *)hicapsable,
42 (UBYTE *)hirepeatable
46 #undef N
47 #undef S
48 #undef A
49 #undef C
50 #undef D
51 #undef V
52 #undef ST
53 #undef NOP
55 #define N KC_NOQUAL
56 #define S KCF_SHIFT
57 #define A KCF_ALT
58 #define C KCF_CONTROL
59 #define D KCF_DEAD
60 #define V KC_VANILLA
61 #define ST KCF_STRING
62 #define NOP KCF_NOP
64 #define EUR 0xA4 /* ISO 8859-15: Euro = 164 = 0xA4) */
66 STATIC CONST UBYTE lokeymaptypes[] =
68 S|A, /* 00 left of 1 */
69 S|A, /* 01 1 */
70 V, /* 02 2 */
71 V, /* 03 3 */
72 S|A, /* 04 4 */
73 S|A, /* 05 */
74 S|A, /* 06 */
75 S|A, /* 07 */
76 S|A, /* 08 */
77 S|A, /* 09 */
78 S|A, /* 0A */
79 S|A, /* 0B Right of 0 */
80 S|A, /* 0C 2nd right of 0 */
81 N, /* 0D 3rd right of 0 */
82 N, /* 0E undef */
83 S|A, /* 0F NUM 0 */
85 V, /* 10 q */
86 V, /* 11 w */
87 D|V, /* 12 e */
88 V, /* 13 r */
89 V, /* 14 t */
90 V, /* 15 y */
91 D|V, /* 16 u */
92 D|V, /* 17 i */
93 D|V, /* 18 o */
94 V, /* 19 p */
96 S|A, /* 1A + * */
97 D|S|A, /* 1B ´ ` */
98 N, /* 1C undefined */
99 N, /* 1D NUM 1 */
100 N, /* 1E NUM 2 */
101 N, /* 1F NUM 3 */
103 D|V, /* 20 a */
104 V, /* 21 s */
105 V, /* 22 d */
106 V, /* 23 f */
107 V, /* 24 g */
108 V, /* 25 h */
109 V, /* 26 j */
110 V, /* 27 k */
111 V, /* 28 l */
112 S|A, /* 29 ç */
114 S|A, /* 2A º ª */
115 D|S|A, /* 2B ~ ^ */
116 N, /* 2C undefined */
117 N, /* 2D NUM 4 */
118 N, /* 2E NUM 5 */
119 N, /* 2F NUM 6 */
120 S|A, /* 30 < > */
121 V, /* 31 z */
122 V, /* 32 x */
123 V, /* 33 c */
124 V, /* 34 v */
125 V, /* 35 b */
126 V, /* 36 n */
128 V, /* 37 m */
129 S|A, /* 38 , ; */
130 S|A, /* 39 . : */
131 S, /* 3A - _ */
132 N, /* 3B undefined */
133 N, /* 3C NUM . */
134 N, /* 3D NUM 7 */
135 N, /* 3E NUM 8 */
136 N, /* 3F NUM 9 */
139 STATIC CONST UBYTE hikeymaptypes[] =
141 D|S, /* 40 SPACE */
142 N, /* 41 BACKSPACE */
143 ST|S, /* 42 TAB */
144 N, /* 43 ENTER */
145 C, /* 44 RETURN */
146 A, /* 45 ESCAPE */
147 N, /* 46 DEL */
148 ST|S, /* 47 INSERT ?? */
149 ST|S, /* 48 PAGE UP ?? */
150 ST|S, /* 49 PAGE DOWN ?? */
151 N, /* 4A NUMERIC PAD - */
152 ST|S, /* 4B F11 ?? */
153 ST|S, /* 4C CURSORUP*/
154 ST|S, /* 4D CURSORDOWN */
155 ST|S, /* 4E CURSORRIGHT */
156 ST|S, /* 4F CURSORLEFT */
157 ST|S, /* 50 F1 */
158 ST|S, /* 51 F2 */
159 ST|S, /* 52 F3 */
160 ST|S, /* 53 F4 */
161 ST|S, /* 54 F5 */
162 ST|S, /* 55 F6 */
163 ST|S, /* 56 F7 */
164 ST|S, /* 57 F8 */
165 ST|S, /* 58 F9 */
166 ST|S, /* 59 F10 */
167 NOP, /* 5A NUMLOCK */
168 N, /* 5B NUMPAD ) */
169 N, /* 5C NUMPAD / */
170 N, /* 5D NUMPAD * */
171 N, /* 5E NUMPAD + */
172 ST, /* 5F HELP */
173 NOP, /* 60 LEFT SHIFT*/
174 NOP, /* 61 RIGHT SHIFT */
175 NOP, /* 62 CAPS LOCK */
176 NOP, /* 63 CONTROL */
177 NOP, /* 64 LALT */
178 NOP, /* 65 RALT */
179 NOP, /* 66 LCOMMAND */
180 NOP, /* 67 RCOMMAND */
181 NOP, /* 68 LEFT MOUSE BUTTON*/
182 NOP, /* 69 RIGHT MOUSE BUTTON */
183 NOP, /* 6A MIDDLE MOUSE BUTTON */
184 NOP, /* 6B */
185 NOP, /* 6C */
186 NOP, /* 6D */
187 ST|A, /* 6E PAUSE/BREAK ??*/
188 ST|S, /* 6F F12 ?? */
189 ST|C, /* 70 HOME ?? */
190 ST|C, /* 71 END ?? */
191 NOP, /* 72 */
192 NOP, /* 73 */
193 NOP, /* 74 */
194 NOP, /* 75 */
195 NOP, /* 76 */
196 NOP, /* 77 */
197 NOP, /* 78 */
198 NOP, /* 79 */
199 NOP, /* 7A */
200 NOP, /* 7B */
201 NOP, /* 7C */
202 NOP, /* 7D */
203 NOP, /* 7E */
204 NOP /* 7F */
207 #undef N
208 #undef S
209 #undef A
210 #undef C
211 #undef D
212 #undef V
213 #undef ST
214 #undef NOP
216 #undef STRING
217 #undef DEAD
218 #undef BYTES
220 #define STRING(x) (IPTR)x
221 #define DEAD(x) (IPTR)x
222 #define BYTES(b0, b1, b2, b3) \
223 (((UBYTE)b0)<<24) | (((UBYTE)b1)<<16) | (((UBYTE)b2)<<8) | (((UBYTE)b3)<<0)
225 /* dead symbols
227 1= ´
228 2 = `
229 3 = ^
230 4 = ~
231 5 = "
232 6 = °
236 STATIC CONST UBYTE a_descr[] =
238 DPF_MOD, 0x10,
239 DPF_MOD, 0x17,
240 0, 'æ', /* 0xE6 */
241 0, 'Æ', /* 0xC6 */
242 0, 0x01,
243 0, 0x01,
244 0, 0x81,
245 0, 0x81,
247 'a', 'á' /*0xE1*/, 'à' /*0xE0*/, 'â' /*0xE2*/, 'ã' /*0xE3*/, 'ä' /*0xE4*/, 'å' /*0xE5*/,
249 'A', 'Á' /*0xC1*/, 'À' /*0xC0*/, 'Â' /*0xC2*/, 'Ã' /*0xC3*/, 'Ä' /*0xC4*/, 'Å' /*0xC5*/
252 STATIC CONST UBYTE e_descr[] =
254 DPF_MOD, 0x10,
255 DPF_MOD, 0x17,
256 0, EUR,
257 0, '¢',
258 0, 0x05,
259 0, 0x05,
260 0, 0x85,
261 0, 0x85,
263 'e', 'é' /*0xE9*/, 'è' /*0xE8*/, 'ê' /*0xEA*/, 'e', 'ë' /*0xEB*/, 'e',
265 'E', 'É' /*0xC9*/, 'È' /*0xC8*/, 'Ê' /*0xCA*/, 'E', 'Ë' /*0xCB*/, 'E'
268 STATIC CONST UBYTE u_descr[] =
270 DPF_MOD, 0x10,
271 DPF_MOD, 0x17,
272 0, 'µ', /* 0xB5 */
273 0, 'µ', /* 0xB5 */
274 0, 0x15,
275 0, 0x15,
276 0, 0x95,
277 0, 0x95,
279 'u', 'ú' /*0xFA*/, 'ù' /*0xF9*/, 'û' /*0xFB*/, 'u', 'ü' /*0xFC*/, 'u',
281 'U', 'Ú' /*0xDA*/, 'Ù' /*0xD9*/, 'Û' /*0xDB*/, 'U', 'Ü' /*0xDC*/, 'U'
284 STATIC CONST UBYTE i_descr[] =
286 DPF_MOD, 0x10,
287 DPF_MOD, 0x17,
288 0, '¡', /* 0xA1 */
289 0, '¦', /* 0xA6 */
290 0, 0x09,
291 0, 0x09,
292 0, 0x89,
293 0, 0x89,
295 'i', 'í' /*0xED*/, 'ì' /*0xEC*/, 'î' /*0xEE*/, 'i', 'ï' /*0xEF*/, 'i',
297 'I', 'Í' /*0xCD*/, 'Ì' /*0xCC*/, 'Î' /*0xCE*/, 'I', 'Ï' /*0xCF*/, 'I'
300 STATIC CONST UBYTE o_descr[] =
302 DPF_MOD, 0x10,
303 DPF_MOD, 0x17,
304 0, 'ø', /* 0xF8 */
305 0, 'Ø', /* 0xD8 */
306 0, 0x0F,
307 0, 0x0F,
308 0, 0x8F,
309 0, 0x8F,
311 'o', 'ó' /*0xF3*/, 'ò' /*0xF2*/, 'ô' /*0xF4*/, 'õ' /*0xF5*/, 'ö' /*0xF6*/, 'o',
313 'O', 'Ó' /*0xD3*/, 'Ò' /*0xD2*/, 'Ô' /*0xD4*/, 'Õ' /*0xD5*/, 'Ö' /*0xD6*/, 'O'
316 STATIC CONST UBYTE space_descr[] =
318 DPF_MOD, 0x4,
319 0, 0XA0,
321 ' ', '´' /*0xB4*/, '`','^','~', '¨' /*0xA8*/, '°' /*0xB0*/
324 STATIC CONST UBYTE KEY1B_descr[] =
326 DPF_DEAD, 1,
327 DPF_DEAD, 2,
328 DPF_DEAD, 1,
329 DPF_DEAD, 2
332 STATIC CONST UBYTE KEY2B_descr[] =
334 DPF_DEAD, 4, /* 0, '~', */
335 DPF_DEAD, 3, /* 0, '^', */
336 DPF_DEAD, 4,
337 DPF_DEAD, 3
340 STATIC CONST IPTR lokeymap[] =
342 BYTES('|','\\', '|','\\'), /* 00 Left of 1 Key */
343 BYTES('¹', '¹', '!', '1'), /* 01 1 */
344 BYTES('@', '@', '"', '2'), /* 02 2 */
345 BYTES('£', '£', '#', '3'), /* 03 3 */
346 BYTES('§', '§', '$', '4'), /* 04 4 */
347 BYTES('%', '5', '%', '5'), /* 05 5 */
348 BYTES('&', '6', '&', '6'), /* 06 6 */
349 BYTES('{', '{', '/', '7'), /* 07 7 */
350 BYTES('[', '[', '(', '8'), /* 08 8 */
351 BYTES(']', ']', ')', '9'), /* 09 9 */
352 BYTES('}', '}', '=', '0'), /* 0A 0 */
353 BYTES('?','\'', '?','\''), /* 0B Right of 0 */
354 BYTES('»', '«', '»', '«'), /* 0C 2nd right of 0 */
355 BYTES('|', '|', '|', '|'), /* 0D 3rd right of 0 */
356 BYTES(0, 0, 0, 0), /* 0E undefined */
357 BYTES('0', '0', '0', '0'), /* 0F NUM 0 */
359 BYTES('Q', 'q', 'Q', 'q'), /* 10 */
360 BYTES('W', 'w', 'W', 'w'), /* 11 */
361 DEAD(e_descr), /* 12 */
362 BYTES('R', 'r', 'R', 'r'), /* 13 */
363 BYTES('T', 't', 'T', 't'), /* 14 */
364 BYTES('Y', 'y', 'Y', 'y'), /* 15 */
365 DEAD(u_descr), /* 16 */
366 DEAD(i_descr), /* 17 */
367 DEAD(o_descr), /* 18 */
368 BYTES('Þ', 'þ', 'P', 'p'), /* 19 */
369 BYTES('*', '+', '*', '+'), /* 1A */
370 DEAD(KEY1B_descr), /* 1B */
371 BYTES(0, 0, 0, 0), /* 1C undefined */
372 BYTES('1', '1', '1', '1'), /* 1D NUM 1*/
373 BYTES('2', '2', '2', '2'), /* 1E NUM 2*/
374 BYTES('3', '3', '3', '3'), /* 1F NUM 3*/
376 DEAD(a_descr), /* 20 */
377 BYTES('S', 's', 'S', 's'), /* 21 */
378 BYTES('D', 'd', 'D', 'd'), /* 22 */
379 BYTES('F', 'f', 'F', 'f'), /* 23 */
380 BYTES('G', 'g', 'G', 'g'), /* 24 */
381 BYTES('H', 'h', 'H', 'h'), /* 25 */
382 BYTES('J', 'j', 'J', 'j'), /* 26 */
383 BYTES('K', 'k', 'K', 'k'), /* 27 */
384 BYTES('L', 'l', 'L', 'l'), /* 28 */
385 BYTES('Ç', 'ç', 'Ç', 'ç'), /* 29 */
387 BYTES('ª', 'º', 'ª', 'º'), /* 2A */
388 DEAD(KEY2B_descr), /* 2B */
389 BYTES(0, 0, 0, 0), /* 2C undefined */
390 BYTES('4', '4', '4', '4'), /* 2D NUM 4 */
391 BYTES('5', '5', '5', '5'), /* 2E NUM 5 */
392 BYTES('6', '6', '6', '6'), /* 2F NUM 6 */
393 BYTES('¦', '|', '>', '<'), /* 30 */
394 BYTES('Z', 'z', 'Z', 'z'), /* 31 */
395 BYTES('X', 'x', 'X', 'x'), /* 32 */
396 BYTES('C', 'c', 'C', 'c'), /* 33 */
397 BYTES('V', 'v', 'V', 'v'), /* 34 */
398 BYTES('B', 'b', 'B', 'b'), /* 35 */
399 BYTES('N', 'n', 'N', 'n'), /* 36 */
401 BYTES('M', 'm', 'M', 'm'), /* 37 */
402 BYTES(';', ',', ';', ','), /* 38 */
403 BYTES(':', '.', ':', '.'), /* 39 */
404 BYTES('_', '-', '_', '-'), /* 3A */
405 BYTES(0, 0, 0, 0), /* 3B */
406 BYTES('.', '.', '.', '.'), /* 3C NUM . */
407 BYTES('7', '7', '7', '7'), /* 3D NUM 7 */
408 BYTES('8', '8', '8', '8'), /* 3E NUM 8 */
409 BYTES('9', '9', '9', '9'), /* 3F NUM 9 */
412 #include "standard.h"
414 STATIC CONST IPTR hikeymap[] =
416 DEAD(space_descr), /* 40 SPACE */
417 BYTES(8, 8, 8, 8), /* 41 BACKSPACE*/
418 STRING(tab_descr), /* 42 TAB */
419 BYTES(13, 13, 13, 13), /* 43 ENTER */
420 BYTES(0, 0, 10, 13), /* 44 RETURN */
421 BYTES(0, 0, 0x9B, 27), /* 45 ESCAPE */
422 BYTES(127, 127, 127, 127), /* 46 DEL */
423 STRING(insert_descr), /* 47 INSERT ?? */
424 STRING(pageup_descr), /* 48 PAGEUP ?? */
425 STRING(pagedown_descr), /* 49 PAGEDOWN ?? */
426 BYTES('-', '-', '-', '-'), /* 4A NUMPAD - */
427 STRING(f11_descr), /* 4B F11 ?? */
428 STRING(up_descr), /* 4C CURSOR UP*/
429 STRING(down_descr), /* 4D CURSOR DOWN*/
430 STRING(right_descr), /* 4E CURSOR RIGHT */
431 STRING(left_descr), /* 4F CURSOR LEFT */
432 STRING(f1_descr), /* 50 F1 */
433 STRING(f2_descr), /* 51 */
434 STRING(f3_descr), /* 52 */
435 STRING(f4_descr), /* 53 */
436 STRING(f5_descr), /* 54 */
437 STRING(f6_descr), /* 55 */
438 STRING(f7_descr), /* 56 */
439 STRING(f8_descr), /* 57 */
440 STRING(f9_descr), /* 58 */
441 STRING(f10_descr), /* 59 */
442 BYTES(0, 0, 0, 0), /* 5A */
443 BYTES('/', '/', '/', '/'), /* 5B */
444 BYTES('*', '*', '*', '*'), /* 5C */
445 BYTES('-', '-', '-', '-'), /* 5D */
446 BYTES('+', '+', '+', '+'), /* 5E */
447 STRING(help_descr), /* 5F HELP */
448 BYTES(0, 0, 0, 0), /* 60 */
449 BYTES(0, 0, 0, 0), /* 61 */
450 BYTES(0, 0, 0, 0), /* 62 */
451 BYTES(0, 0, 0, 0), /* 63 */
452 BYTES(0, 0, 0, 0), /* 64 */
453 BYTES(0, 0, 0, 0), /* 65 */
454 BYTES(0, 0, 0, 0), /* 66 */
455 BYTES(0, 0, 0, 0), /* 67 */
456 BYTES(0, 0, 0, 0), /* 68 */
457 BYTES(0, 0, 0, 0), /* 69 */
458 BYTES(0, 0, 0, 0), /* 6A */
459 BYTES(0, 0, 0, 0), /* 6B */
460 BYTES(0, 0, 0, 0), /* 6C */
461 BYTES(0, 0, 0, 0), /* 6D */
462 STRING(pausebreak_descr), /* 6E PAUSE/BREAK ?? */
463 STRING(f12_descr), /* 6F F12 ?? */
464 STRING(home_descr), /* 70 HOME ?? */
465 STRING(end_descr), /* 71 END ?? */
466 BYTES(0, 0, 0, 0), /* 72 */
467 BYTES(0, 0, 0, 0), /* 73 */
468 BYTES(0, 0, 0, 0), /* 74 */
469 BYTES(0, 0, 0, 0), /* 75 */
470 BYTES(0, 0, 0, 0), /* 76 */
471 BYTES(0, 0, 0, 0), /* 77 */
472 BYTES(0, 0, 0, 0), /* 78 */
473 BYTES(0, 0, 0, 0), /* 79 */
474 BYTES(0, 0, 0, 0), /* 7A */
475 BYTES(0, 0, 0, 0), /* 7B */
476 BYTES(0, 0, 0, 0), /* 7C */
477 BYTES(0, 0, 0, 0), /* 7D */
478 BYTES(0, 0, 0, 0), /* 7E */
479 BYTES(0, 0, 0, 0), /* 7F */
482 #undef SETBITS
484 #define SETBITS(b0, b1, b2, b3, b4, b5, b6, b7) \
485 (b0<<0)|(b1<<1)|(b2<<2)|(b3<<3)|(b4<<4)|(b5<<5)|(b6<<6)|(b7<<7)
487 STATIC CONST UBYTE locapsable[] =
489 SETBITS(0, 0, 0, 0, 0, 0, 0, 0), /* 00 - 07 */
490 SETBITS(0, 0, 0, 0, 0, 0, 0, 0), /* 08 - 0F */
492 SETBITS(1, 1, 1, 1, 1, 1, 1, 1), /* 10 - 17 */
493 SETBITS(1, 1, 0, 0, 0, 0, 0, 0), /* 18 - 1F */
495 SETBITS(1, 1, 1, 1, 1, 1, 1, 1), /* 20 - 27 */
496 SETBITS(1, 1, 0, 0, 0, 0, 0, 0), /* 28 - 2F */
498 SETBITS(0, 1, 1, 1, 1, 1, 1, 1), /* 30 - 37 */
499 SETBITS(0, 0, 0, 0, 0, 0, 0, 0) /* 38 - 3F */
502 STATIC CONST UBYTE hicapsable[] =
504 SETBITS(0, 0, 0, 0, 0, 0, 0, 0), /* 40 - 47 */
505 SETBITS(0, 0, 0, 0, 0, 0, 0, 0), /* 48 - 4F */
507 SETBITS(0, 0, 0, 0, 0, 0, 0, 0), /* 50 - 57 */
508 SETBITS(0, 0, 0, 0, 0, 0, 0, 0), /* 58 - 5F */
510 SETBITS(0, 0, 0, 0, 0, 0, 0, 0), /* 60 - 67 */
511 SETBITS(0, 0, 0, 0, 0, 0, 0, 0), /* 68 - 6F */
513 SETBITS(0, 0, 0, 0, 0, 0, 0, 0), /* 70 - 77 */
514 SETBITS(0, 0, 0, 0, 0, 0, 0, 0) /* 78 - 7F */
517 STATIC CONST UBYTE lorepeatable[] =
519 SETBITS(1, 1, 1, 1, 1, 1, 1, 1), /* 00 - 07 */
520 SETBITS(1, 1, 1, 1, 1, 1, 0, 1), /* 08 - 0F */
522 SETBITS(1, 1, 1, 1, 1, 1, 1, 1), /* 10 - 17 */
523 SETBITS(1, 1, 1, 1, 0, 1, 1, 1), /* 18 - 1F */
525 SETBITS(1, 1, 1, 1, 1, 1, 1, 1), /* 20 - 27 */
526 SETBITS(1, 1, 1, 1, 0, 1, 1, 1), /* 28 - 2F */
528 SETBITS(1, 1, 1, 1, 1, 1, 1, 1), /* 30 - 37 */
529 SETBITS(1, 1, 1, 0, 1, 1, 1, 1) /* 38 - 3F */
532 STATIC CONST UBYTE hirepeatable[] =
534 SETBITS(1, 1, 1, 0, 0, 0, 1, 0), /* 40 - 47 */
535 SETBITS(1, 1, 0, 0, 1, 1, 1, 1), /* 48 - 4F */
537 SETBITS(0, 0, 0, 0, 0, 0, 0, 0), /* 50 - 57 */
538 SETBITS(0, 0, 1, 1, 1, 1, 1, 0), /* 58 - 5F */
540 SETBITS(0, 0, 0, 0, 0, 0, 0, 0), /* 60 - 67 */
541 SETBITS(0, 0, 0, 0, 0, 0, 0, 0), /* 68 - 6F */
543 SETBITS(0, 0, 0, 0, 0, 0, 0, 0), /* 70 - 77 */
544 SETBITS(0, 0, 0, 0, 0, 0, 0, 0) /* 78 - 7F */