1 /* $NetBSD: kbdmap.c.ascii,v 1.2.116.1 2007/05/22 17:27:45 matt Exp $ */
2 /* from: arch/amiga/dev/kbdmap.c */
3 /* modified for X680x0 by Masaru Oki */
7 /* define a default keymap. This can be changed by keyboard ioctl's
11 #define S KBD_MODE_STRING
12 #define DG (KBD_MODE_DEAD | KBD_MODE_GRAVE)
13 #define DA (KBD_MODE_DEAD | KBD_MODE_ACUTE)
14 #define DC (KBD_MODE_DEAD | KBD_MODE_CIRC)
15 #define DT (KBD_MODE_DEAD | KBD_MODE_TILDE)
16 #define DD (KBD_MODE_DEAD | KBD_MODE_DIER)
17 #define C KBD_MODE_CAPS
18 #define K KBD_MODE_KPAD
21 struct kbdmap ascii_kbdmap = {
39 0, DEL, /* really BS, DEL & BS swapped */
79 0, '\b', /* really DEL, BS & DEL swapped */
80 0, 0, /* 0x38 ROLLUP */
83 S, 0x0C, /* CRSR LEFT */
84 S, 0x00, /* now it gets hairy.. CRSR UP */
85 S, 0x08, /* CRSR RIGHT */
86 S, 0x04, /* CRSR DOWN */
130 S, 0x33, /* 0x58 F8 */
152 0, DEL, /* really BS, DEL & BS swapped */
153 S, 0x99, /* 0x10 shift TAB */
166 0, '\r', /* return */
192 0, '\b', /* really DEL, BS & DEL swapped */
193 0, 0, /* 0x38 ROLLUP */
196 S, 0x51, /* shift CRSR RIGHT */
197 S, 0x47, /* shift CRSR UP */
198 S, 0x57, /* shift CRSR LEFT */
199 S, 0x4C, /* shift CRSR DOWN */
237 S, 0x5D, /* shift F1 */
238 S, 0x63, /* shift F2 */
239 S, 0x69, /* shift F3 */
240 S, 0x6F, /* shift F4 */
241 S, 0x75, /* shift F5 */
242 S, 0x7B, /* shift F6 */
243 S, 0x81, /* shift F7 */
244 S, 0x87, /* 0x58 shift F8 */
245 S, 0x8D, /* shift F9 */
246 S, 0x93, /* shift F10 */
259 /* string table. If there's a better way to get the offsets into the
260 above table, please tell me..
262 NOTE: save yourself and others a lot of grief by *not* using
263 CSI == 0x9b, using the two-character sequence gives
264 much less trouble, especially in GNU-Emacs.. */
266 3, ESC, '[', 'A', /* 0x00: CRSR UP */
267 3, ESC, '[', 'B', /* 0x04: CRSR DOWN */
268 3, ESC, '[', 'C', /* 0x08: CRSR RIGHT */
269 3, ESC, '[', 'D', /* 0x0C: CRSR LEFT */
270 4, ESC, '[', '0', '~', /* 0x10: F1 */
271 4, ESC, '[', '1', '~', /* 0x15: F2 */
272 4, ESC, '[', '2', '~', /* 0x1A: F3 */
273 4, ESC, '[', '3', '~', /* 0x1F: F4 */
274 4, ESC, '[', '4', '~', /* 0x24: F5 */
275 4, ESC, '[', '5', '~', /* 0x29: F6 */
276 4, ESC, '[', '6', '~', /* 0x2E: F7 */
277 4, ESC, '[', '7', '~', /* 0x33: F8 */
278 4, ESC, '[', '8', '~', /* 0x38: F9 */
279 4, ESC, '[', '9', '~', /* 0x3D: F10 */
280 4, ESC, '[', '?', '~', /* 0x42: HELP */
282 4, ESC, '[', 'T', '~', /* 0x47: shift CRSR UP */
283 4, ESC, '[', 'S', '~', /* 0x4C: shift CRSR DOWN */
284 5, ESC, '[', ' ', '@', '~', /* 0x51: shift CRSR RIGHT */
285 5, ESC, '[', ' ', 'A', '~', /* 0x57: shift CRSR LEFT */
286 5, ESC, '[', '1', '0', '~', /* 0x5D: shift F1 */
287 5, ESC, '[', '1', '1', '~', /* 0x63: shift F2 */
288 5, ESC, '[', '1', '2', '~', /* 0x69: shift F3 */
289 5, ESC, '[', '1', '3', '~', /* 0x6F: shift F4 */
290 5, ESC, '[', '1', '4', '~', /* 0x75: shift F5 */
291 5, ESC, '[', '1', '5', '~', /* 0x7B: shift F6 */
292 5, ESC, '[', '1', '6', '~', /* 0x81: shift F7 */
293 5, ESC, '[', '1', '7', '~', /* 0x87: shift F8 */
294 5, ESC, '[', '1', '8', '~', /* 0x8D: shift F9 */
295 5, ESC, '[', '1', '9', '~', /* 0x93: shift F10 */
296 3, ESC, '[', 'Z', /* 0x99: shift TAB */
297 2, ESC, '[', /* 0x9d: alt ESC == CSI */
301 unsigned char acctable[KBD_NUM_ACC][64] = {