added concrete implementations of putc(), getc(), getchar() and gets()
[tangerine.git] / workbench / devs / keymaps / pc105_usx.c
blobc6e453676e8404043dfc5cfacf4916ae800fb76f
1 // Kbdusx_EnglishUnitedStatesExtended_pkf.txt
2 /*
3 Copyright © 1995-2006, The AROS Development Team. All rights reserved.
4 $Id$
6 Desc: US Extended PC105 Keymap
7 Lang: Engslish
8 */
10 #include <devices/keymap.h>
12 STATIC char keymapname[] = "pc105_usx";
14 STATIC CONST UBYTE lokeymaptypes[];
15 STATIC CONST IPTR lokeymap[];
16 STATIC CONST UBYTE locapsable[];
17 STATIC CONST UBYTE lorepeatable[];
19 STATIC CONST UBYTE hikeymaptypes[];
20 STATIC CONST IPTR hikeymap[];
21 STATIC CONST UBYTE hicapsable[];
22 STATIC CONST UBYTE hirepeatable[];
24 CONST struct KeyMapNode km =
26 #if (AROS_FLAVOUR & AROS_FLAVOUR_BINCOMPAT)
28 NULL, NULL, 0, 0, keymapname
30 #else
32 NULL, NULL, keymapname, 0, 0
34 #endif
36 (UBYTE *)lokeymaptypes,
37 (IPTR *)lokeymap,
38 (UBYTE *)locapsable,
39 (UBYTE *)lorepeatable,
40 (UBYTE *)hikeymaptypes,
41 (IPTR *)hikeymap,
42 (UBYTE *)hicapsable,
43 (UBYTE *)hirepeatable
47 #undef N
48 #undef S
49 #undef A
50 #undef C
51 #undef D
52 #undef V
53 #undef ST
54 #undef NOP
56 #define N KC_NOQUAL
57 #define S KCF_SHIFT
58 #define A KCF_ALT
59 #define C KCF_CONTROL
60 #define D KCF_DEAD
61 #define V KC_VANILLA
62 #define ST KCF_STRING
63 #define NOP KCF_NOP
65 #define EUR 0xA4 /* ISO 8859-15: Euro = 164 = 0xA4) */
67 STATIC CONST UBYTE lokeymaptypes[] =
69 S, /* 00 */
70 S, /* 01 */
71 S|A, /* 02 */
72 S|A, /* 03 */
73 S|A, /* 04 */
74 S, /* 05 */
75 S, /* 06 */
76 S, /* 07 */
77 S, /* 08 */
78 S, /* 09 */
79 S, /* 0A */
80 S, /* 0B */
81 S, /* 0C */
82 N, /* 0D */
83 N, /* 0E */
84 S|A, /* 0F */
85 V, /* 10 q */
86 V, /* 11 w */
87 V, /* 12 e */
88 V, /* 13 r */
89 V, /* 14 t */
90 V, /* 15 z */
91 V, /* 16 u */
92 V, /* 17 i */
93 V, /* 18 o */
94 V, /* 19 p */
95 S, /* 1A */
96 S|A, /* 1B */
97 S|A, /* 1C */
98 S|A, /* 1D */
99 S|A, /* 1E */
100 S|A, /* 1F */
101 V, /* 20 a */
102 V, /* 21 s */
103 V, /* 22 d */
104 V, /* 23 f */
105 V, /* 24 g */
106 V, /* 25 h */
107 V, /* 26 j */
108 V, /* 27 k */
109 V, /* 28 l */
110 S, /* 29 */
111 S, /* 2A */
112 S, /* 2B */
113 N, /* 2C */
114 N, /* 2D */
115 N, /* 2E */
116 N, /* 2F */
117 S|A, /* 30 */
118 V, /* 31 y */
119 V, /* 32 x */
120 V, /* 33 c */
121 V, /* 34 v */
122 V, /* 35 b */
123 V, /* 36 n */
124 V, /* 37 m */
125 S|A, /* 38 */
126 S|A, /* 39 */
127 S, /* 3A */
128 N, /* 3B */
129 N, /* 3C */
130 N, /* 3D */
131 N, /* 3E */
132 N, /* 3F */
135 STATIC CONST UBYTE hikeymaptypes[] =
137 N, /* 40 SPACE */
138 N, /* 41 BACKSPACE */
139 ST|S, /* 42 TAB */
140 N, /* 43 ENTER */
141 C, /* 44 RETURN */
142 A, /* 45 ESCAPE */
143 N, /* 46 DEL */
144 ST|S, /* 47 INSERT ?? */
145 ST|S, /* 48 PAGE UP ?? */
146 ST|S, /* 49 PAGE DOWN ?? */
147 N, /* 4A NUMERIC PAD - */
148 ST|S, /* 4B F11 ?? */
149 ST|S, /* 4C CURSORUP*/
150 ST|S, /* 4D CURSORDOWN */
151 ST|S, /* 4E CURSORRIGHT */
152 ST|S, /* 4F CURSORLEFT */
153 ST|S, /* 50 F1 */
154 ST|S, /* 51 F2 */
155 ST|S, /* 52 F3 */
156 ST|S, /* 53 F4 */
157 ST|S, /* 54 F5 */
158 ST|S, /* 55 F6 */
159 ST|S, /* 56 F7 */
160 ST|S, /* 57 F8 */
161 ST|S, /* 58 F9 */
162 ST|S, /* 59 F10 */
163 NOP, /* 5A NUMLOCK */
164 N, /* 5B NUMPAD ) */
165 N, /* 5C NUMPAD / */
166 N, /* 5D NUMPAD * */
167 N, /* 5E NUMPAD + */
168 ST, /* 5F HELP */
169 NOP, /* 60 LEFT SHIFT*/
170 NOP, /* 61 RIGHT SHIFT */
171 NOP, /* 62 CAPS LOCK */
172 NOP, /* 63 CONTROL */
173 NOP, /* 64 LALT */
174 NOP, /* 65 RALT */
175 NOP, /* 66 LCOMMAND */
176 NOP, /* 67 RCOMMAND */
177 NOP, /* 68 LEFT MOUSE BUTTON*/
178 NOP, /* 69 RIGHT MOUSE BUTTON */
179 NOP, /* 6A MIDDLE MOUSE BUTTON */
180 NOP, /* 6B */
181 NOP, /* 6C */
182 NOP, /* 6D */
183 ST|A, /* 6E PAUSE/BREAK ??*/
184 ST|S, /* 6F F12 ?? */
185 ST|C, /* 70 HOME ?? */
186 ST|C, /* 71 END ?? */
187 NOP, /* 72 */
188 NOP, /* 73 */
189 NOP, /* 74 */
190 NOP, /* 75 */
191 NOP, /* 76 */
192 NOP, /* 77 */
193 NOP, /* 78 */
194 NOP, /* 79 */
195 NOP, /* 7A */
196 NOP, /* 7B */
197 NOP, /* 7C */
198 NOP, /* 7D */
199 NOP, /* 7E */
200 NOP /* 7F */
203 #undef N
204 #undef S
205 #undef A
206 #undef C
207 #undef D
208 #undef V
209 #undef ST
210 #undef NOP
212 #undef STRING
213 #undef DEAD
214 #undef BYTES
216 #define STRING(x) (IPTR)x
217 #define DEAD(x) (IPTR)x
218 #define BYTES(b0, b1, b2, b3) \
219 (((UBYTE)b0)<<24) | (((UBYTE)b1)<<16) | (((UBYTE)b2)<<8) | (((UBYTE)b3)<<0)
221 STATIC CONST IPTR lokeymap[] = {
222 /*---- 1st QWERTY row - 0x00 to 0x0F */
223 BYTES('.' ,'.' ,0x7E,0x60),
224 BYTES(0xB9,0xA1,'!' ,'1' ),
225 BYTES(0xB2,0xB2,'@' ,'2' ),
226 BYTES(0xB3,0xB3,'#' ,'3' ),
227 BYTES(0xA3,0xA4,'$' ,'4' ),
228 BYTES(0x80,0x80,'%' ,'5' ),
229 BYTES(0xBC,0xBC,0x5E,'6' ),
230 BYTES(0xBD,0xBD,'&' ,'7' ),
231 BYTES(0xBE,0xBE,'*' ,'8' ),
232 BYTES(0x91,0x91,'(' ,'9' ),
233 BYTES(0x92,0x92,')' ,'0' ),
234 BYTES(0xA5,0xA5,'_' ,'-' ),
235 BYTES(0xF7,0xD7,'+' ,'=' ),
236 BYTES('.' ,'.' ,0x7E,0x60),
237 BYTES(0, 0, 0, 0 ),
238 BYTES('0', '0', '0', '0'),
239 /*---- 2nd QWERTY row - 0x10 to 0x1F */
240 BYTES(0xC4,0xE4,'Q' ,'q' ),
241 BYTES(0xC5,0xE5,'W' ,'w' ),
242 BYTES(0xC9,0xE9,'E' ,'e' ),
243 BYTES('.' ,0xAE,'R' ,'r' ),
244 BYTES(0xDE,0xFE,'T' ,'t' ),
245 BYTES(0xDC,0xFC,'Y' ,'y' ),
246 BYTES(0xDA,0xFA,'U' ,'u' ),
247 BYTES(0xCD,0xED,'I' ,'i' ),
248 BYTES(0xD3,0xF3,'O' ,'o' ),
249 BYTES(0xD6,0xF6,'P' ,'p' ),
250 BYTES(0xAB,0xAB,'{' ,'[' ),
251 BYTES(0xBB,0xBB,'}' ,']' ),
252 BYTES(0, 0, 0, 0 ),
253 BYTES('1', '1', '1', '1'),
254 BYTES('2', '2', '2', '2'),
255 BYTES('3', '3', '3', '3'),
256 /*---- 3rd QWERTY row - 0x20 to 0x2F */
257 BYTES(0xC1,0xE1,'A' ,'a' ),
258 BYTES(0xA7,0xDF,'S' ,'s' ),
259 BYTES(0xD0,0xF0,'D' ,'d' ),
260 BYTES(0xDE,0xFE,'F' ,'f' ),
261 BYTES('.' ,'.' ,'G' ,'g' ),
262 BYTES('.' ,'.' ,'H' ,'h' ),
263 BYTES('.' ,'.' ,'J' ,'j' ),
264 BYTES('.' ,'.' ,'K' ,'k' ),
265 BYTES(0xD8,0xF8,'L' ,'l' ),
266 BYTES(0xB0,0xB6,':' ,';' ),
267 BYTES(0xA8,0xB4,0x22,0x27),
268 BYTES(0xA6,0xAC,0x7C,0x5C),
269 BYTES(0, 0, 0, 0 ),
270 BYTES('4', '4', '4', '4'),
271 BYTES('5', '5', '5', '5'),
272 BYTES('6', '6', '6', '6'),
273 /*---- 4th QWERTY row - 0x30 to 0x3F */
274 BYTES(0x7C,0x5C,0x7C,0x5C),
275 BYTES(0xC6,0xE6,'Z' ,'z' ),
276 BYTES('.' ,'.' ,'X' ,'x' ),
277 BYTES(0xA2,0xA9,'C' ,'c' ),
278 BYTES('.' ,'.' ,'V' ,'v' ),
279 BYTES(0x95,0xB7,'B' ,'b' ),
280 BYTES(0xD1,0xF1,'N' ,'n' ),
281 BYTES(0xB5,0xB5,'M' ,'m' ),
282 BYTES(0xC7,0xE7,'<' ,',' ),
283 BYTES('.' ,'.' ,'>' ,'.' ),
284 BYTES(0xBF,0xBF,'?' ,0x2F),
285 BYTES(0, 0, 0, 0 ),
286 BYTES(',', '.', ',', '.'),
287 BYTES('7', '7', '7', '7'),
288 BYTES('8', '8', '8', '8'),
289 BYTES('9', '9', '9', '9'),
292 #include "standard.h"
294 STATIC CONST IPTR hikeymap[] =
296 BYTES(' ', ' ', ' ', ' '), /* 40 */
297 BYTES(8, 8, 8, 8), /* 41 BACKSPACE*/
298 STRING(tab_descr), /* 42 TAB */
299 BYTES(13, 13, 13, 13), /* 43 ENTER */
300 BYTES(0, 0, 10, 13), /* 44 RETURN */
301 BYTES(0, 0, 0x9B, 27), /* 45 ESCAPE */
302 BYTES(127, 127, 127, 127), /* 46 DEL */
303 STRING(insert_descr), /* 47 INSERT ?? */
304 STRING(pageup_descr), /* 48 PAGEUP ?? */
305 STRING(pagedown_descr), /* 49 PAGEDOWN ?? */
306 BYTES('-', '-', '-', '-'), /* 4A NUMPAD - */
307 STRING(f11_descr), /* 4B F11 ?? */
308 STRING(up_descr), /* 4C CURSOR UP*/
309 STRING(down_descr), /* 4D CURSOR DOWN*/
310 STRING(right_descr), /* 4E CURSOR RIGHT */
311 STRING(left_descr), /* 4F CURSOR LEFT */
312 STRING(f1_descr), /* 50 F1 */
313 STRING(f2_descr), /* 51 */
314 STRING(f3_descr), /* 52 */
315 STRING(f4_descr), /* 53 */
316 STRING(f5_descr), /* 54 */
317 STRING(f6_descr), /* 55 */
318 STRING(f7_descr), /* 56 */
319 STRING(f8_descr), /* 57 */
320 STRING(f9_descr), /* 58 */
321 STRING(f10_descr), /* 59 */
322 BYTES(0, 0, 0, 0), /* 5A */
323 BYTES('/', '/', '/', '/'), /* 5B */
324 BYTES('*', '*', '*', '*'), /* 5C */
325 BYTES('-', '-', '-', '-'), /* 5D */
326 BYTES('+', '+', '+', '+'), /* 5E */
327 STRING(help_descr), /* 5F HELP */
328 BYTES(0, 0, 0, 0), /* 60 */
329 BYTES(0, 0, 0, 0), /* 61 */
330 BYTES(0, 0, 0, 0), /* 62 */
331 BYTES(0, 0, 0, 0), /* 63 */
332 BYTES(0, 0, 0, 0), /* 64 */
333 BYTES(0, 0, 0, 0), /* 65 */
334 BYTES(0, 0, 0, 0), /* 66 */
335 BYTES(0, 0, 0, 0), /* 67 */
336 BYTES(0, 0, 0, 0), /* 68 */
337 BYTES(0, 0, 0, 0), /* 69 */
338 BYTES(0, 0, 0, 0), /* 6A */
339 BYTES(0, 0, 0, 0), /* 6B */
340 BYTES(0, 0, 0, 0), /* 6C */
341 BYTES(0, 0, 0, 0), /* 6D */
342 STRING(pausebreak_descr), /* 6E PAUSE/BREAK ?? */
343 STRING(f12_descr), /* 6F F12 ?? */
344 STRING(home_descr), /* 70 HOME ?? */
345 STRING(end_descr), /* 71 END ?? */
346 BYTES(0, 0, 0, 0), /* 72 */
347 BYTES(0, 0, 0, 0), /* 73 */
348 BYTES(0, 0, 0, 0), /* 74 */
349 BYTES(0, 0, 0, 0), /* 75 */
350 BYTES(0, 0, 0, 0), /* 76 */
351 BYTES(0, 0, 0, 0), /* 77 */
352 BYTES(0, 0, 0, 0), /* 78 */
353 BYTES(0, 0, 0, 0), /* 79 */
354 BYTES(0, 0, 0, 0), /* 7A */
355 BYTES(0, 0, 0, 0), /* 7B */
356 BYTES(0, 0, 0, 0), /* 7C */
357 BYTES(0, 0, 0, 0), /* 7D */
358 BYTES(0, 0, 0, 0), /* 7E */
359 BYTES(0, 0, 0, 0), /* 7F */
362 #undef SETBITS
364 #define SETBITS(b0, b1, b2, b3, b4, b5, b6, b7) \
365 (b0<<0)|(b1<<1)|(b2<<2)|(b3<<3)|(b4<<4)|(b5<<5)|(b6<<6)|(b7<<7)
367 STATIC CONST UBYTE locapsable[] =
369 SETBITS(0, 0, 0, 0, 0, 0, 0, 0), /* 00 - 07 */
370 SETBITS(0, 0, 0, 0, 0, 0, 0, 0), /* 08 - 0F */
372 SETBITS(1, 1, 1, 1, 1, 1, 1, 1), /* 10 - 17 */
373 SETBITS(1, 1, 0, 0, 0, 0, 0, 0), /* 18 - 1F */
375 SETBITS(1, 1, 1, 1, 1, 1, 1, 1), /* 20 - 27 */
376 SETBITS(1, 0, 0, 0, 0, 0, 0, 0), /* 28 - 2F */
378 SETBITS(0, 1, 1, 1, 1, 1, 1, 1), /* 30 - 37 */
379 SETBITS(0, 0, 0, 0, 0, 0, 0, 0) /* 38 - 3F */
382 STATIC CONST UBYTE hicapsable[] =
384 SETBITS(0, 0, 0, 0, 0, 0, 0, 0), /* 40 - 47 */
385 SETBITS(0, 0, 0, 0, 0, 0, 0, 0), /* 48 - 4F */
387 SETBITS(0, 0, 0, 0, 0, 0, 0, 0), /* 50 - 57 */
388 SETBITS(0, 0, 0, 0, 0, 0, 0, 0), /* 58 - 5F */
390 SETBITS(0, 0, 0, 0, 0, 0, 0, 0), /* 60 - 67 */
391 SETBITS(0, 0, 0, 0, 0, 0, 0, 0), /* 68 - 6F */
393 SETBITS(0, 0, 0, 0, 0, 0, 0, 0), /* 70 - 77 */
394 SETBITS(0, 0, 0, 0, 0, 0, 0, 0) /* 78 - 7F */
397 STATIC CONST UBYTE lorepeatable[] =
399 SETBITS(1, 1, 1, 1, 1, 1, 1, 1), /* 00 - 07 */
400 SETBITS(1, 1, 1, 1, 1, 1, 0, 1), /* 08 - 0F */
402 SETBITS(1, 1, 1, 1, 1, 1, 1, 1), /* 10 - 17 */
403 SETBITS(1, 1, 1, 1, 0, 1, 1, 1), /* 18 - 1F */
405 SETBITS(1, 1, 1, 1, 1, 1, 1, 1), /* 20 - 27 */
406 SETBITS(1, 1, 1, 1, 0, 1, 1, 1), /* 28 - 2F */
408 SETBITS(1, 1, 1, 1, 1, 1, 1, 1), /* 30 - 37 */
409 SETBITS(1, 1, 1, 0, 1, 1, 1, 1) /* 38 - 3F */
412 STATIC CONST UBYTE hirepeatable[] =
414 SETBITS(1, 1, 1, 0, 0, 0, 1, 0), /* 40 - 47 */
415 SETBITS(1, 1, 0, 0, 1, 1, 1, 1), /* 48 - 4F */
417 SETBITS(0, 0, 0, 0, 0, 0, 0, 0), /* 50 - 57 */
418 SETBITS(0, 0, 1, 1, 1, 1, 1, 0), /* 58 - 5F */
420 SETBITS(0, 0, 0, 0, 0, 0, 0, 0), /* 60 - 67 */
421 SETBITS(0, 0, 0, 0, 0, 0, 0, 0), /* 68 - 6F */
423 SETBITS(0, 0, 0, 0, 0, 0, 0, 0), /* 70 - 77 */
424 SETBITS(0, 0, 0, 0, 0, 0, 0, 0) /* 78 - 7F */