1 /* $NetBSD: jis_kmap.c,v 1.2.50.3 2004/09/21 13:24:20 skrll Exp $ */
2 /* from: arch/amiga/dev/kbdmap.c */
3 /* modified for X680x0 by Masaru Oki */
6 __RCSID("$NetBSD: jis_kmap.c,v 1.2.50.3 2004/09/21 13:24:20 skrll Exp $");
8 #include <machine/kbdmap.h>
10 /* define a default keymap. This can be changed by keyboard ioctl's
14 #define S KBD_MODE_STRING
15 #define C KBD_MODE_CAPS
16 #define K KBD_MODE_KPAD
17 #define D KBD_MODE_DEAD
19 struct kbdmap ascii_kbdmap
= {
37 0, DEL
, /* really BS, DEL & BS swapped */
77 0, '\b', /* really DEL, BS & DEL swapped */
78 0, 0, /* 0x38 ROLLUP */
81 S
, 0x0C, /* CRSR LEFT */
82 S
, 0x00, /* now it gets hairy.. CRSR UP */
83 S
, 0x08, /* CRSR RIGHT */
84 S
, 0x04, /* CRSR DOWN */
128 S
, 0x33, /* 0x58 F8 */
150 0, DEL
, /* really BS, DEL & BS swapped */
151 0, '\t', /* 0x10 shift TAB */
164 0, '\r', /* return */
190 0, '\b', /* really DEL, BS & DEL swapped */
191 0, 0, /* 0x38 ROLLUP */
194 0, 0, /* shift CRSR LEFT */
195 0, 0, /* shift CRSR UP */
196 0, 0, /* shift CRSR RIGHT */
197 0, 0, /* shift CRSR DOWN */
234 S
, 0x5D, /* shift F1 */
235 S
, 0x63, /* shift F2 */
236 S
, 0x69, /* shift F3 */
237 S
, 0x6F, /* shift F4 */
238 S
, 0x75, /* shift F5 */
239 S
, 0x7B, /* shift F6 */
240 S
, 0x81, /* shift F7 */
241 S
, 0x87, /* 0x58 shift F8 */
242 S
, 0x8D, /* shift F9 */
243 S
, 0x93, /* shift F10 */
256 /* string table. If there's a better way to get the offsets into the
257 above table, please tell me..
259 NOTE: save yourself and others a lot of grief by *not* using
260 CSI == 0x9b, using the two-character sequence gives
261 much less trouble, especially in GNU-Emacs.. */
263 3, ESC
, '[', 'A', /* 0x00: CRSR UP */
264 3, ESC
, '[', 'B', /* 0x04: CRSR DOWN */
265 3, ESC
, '[', 'C', /* 0x08: CRSR RIGHT */
266 3, ESC
, '[', 'D', /* 0x0C: CRSR LEFT */
267 4, ESC
, '[', '0', '~', /* 0x10: F1 */
268 4, ESC
, '[', '1', '~', /* 0x15: F2 */
269 4, ESC
, '[', '2', '~', /* 0x1A: F3 */
270 4, ESC
, '[', '3', '~', /* 0x1F: F4 */
271 4, ESC
, '[', '4', '~', /* 0x24: F5 */
272 4, ESC
, '[', '5', '~', /* 0x29: F6 */
273 4, ESC
, '[', '6', '~', /* 0x2E: F7 */
274 4, ESC
, '[', '7', '~', /* 0x33: F8 */
275 4, ESC
, '[', '8', '~', /* 0x38: F9 */
276 4, ESC
, '[', '9', '~', /* 0x3D: F10 */
277 4, ESC
, '[', '?', '~', /* 0x42: HELP */
279 4, ESC
, '[', 'T', '~', /* 0x47: shift CRSR UP */
280 4, ESC
, '[', 'S', '~', /* 0x4C: shift CRSR DOWN */
281 5, ESC
, '[', ' ', '@', '~', /* 0x51: shift CRSR RIGHT */
282 5, ESC
, '[', ' ', 'A', '~', /* 0x57: shift CRSR LEFT */
283 5, ESC
, '[', '1', '0', '~', /* 0x5D: shift F1 */
284 5, ESC
, '[', '1', '1', '~', /* 0x63: shift F2 */
285 5, ESC
, '[', '1', '2', '~', /* 0x69: shift F3 */
286 5, ESC
, '[', '1', '3', '~', /* 0x6F: shift F4 */
287 5, ESC
, '[', '1', '4', '~', /* 0x75: shift F5 */
288 5, ESC
, '[', '1', '5', '~', /* 0x7B: shift F6 */
289 5, ESC
, '[', '1', '6', '~', /* 0x81: shift F7 */
290 5, ESC
, '[', '1', '7', '~', /* 0x87: shift F8 */
291 5, ESC
, '[', '1', '8', '~', /* 0x8D: shift F9 */
292 5, ESC
, '[', '1', '9', '~', /* 0x93: shift F10 */
293 3, ESC
, '[', 'Z', /* 0x99: shift TAB */
294 2, ESC
, '[', /* 0x9d: alt ESC == CSI */