1 /* $NetBSD: kbdmap.c,v 1.5.38.1 2007/05/22 17:27:44 matt Exp $ */
3 /* from: arch/amiga/dev/kbdmap.c */
4 /* modified for X680x0 by Masaru Oki and Makoto MINOURA */
7 __KERNEL_RCSID(0, "$NetBSD: kbdmap.c,v 1.5.38.1 2007/05/22 17:27:44 matt Exp $");
11 /* define a default keymap. This can be changed by keyboard ioctl's */
14 #define S KBD_MODE_STRING
15 #define DG (KBD_MODE_DEAD | KBD_MODE_GRAVE)
16 #define DA (KBD_MODE_DEAD | KBD_MODE_ACUTE)
17 #define DC (KBD_MODE_DEAD | KBD_MODE_CIRC)
18 #define DT (KBD_MODE_DEAD | KBD_MODE_TILDE)
19 #define DD (KBD_MODE_DEAD | KBD_MODE_DIER)
20 #define C KBD_MODE_CAPS
21 #define K KBD_MODE_KPAD
22 #define D KBD_MODE_DEAD
25 struct kbdmap ascii_kbdmap
= {
43 {0, DEL
}, /* really BS, DEL & BS swapped */
57 {0, '\r'}, /* return */
83 {0, '\b'}, /* really DEL, BS & DEL swapped */
84 {S
, 0x43}, /* 0x38 ROLLUP */
85 {S
, 0x3e}, /* ROLLDOWN */
87 {S
, 0x53}, /* CRSR LEFT */
88 {S
, 0x5b}, /* CRSR UP */
89 {S
, 0x57}, /* CRSR RIGHT */
90 {S
, 0x4f}, /* CRSR DOWN */
106 {K
, '\r'}, /* enter */
112 {S
, 0x64}, /* HELP */
122 {S
,0x39}, /* INS: not used */
134 {S
, 0x22}, /* 0x68 F8 */
149 {0, '\''}, /* 0x08 */
156 {0, DEL
}, /* really BS, DEL & BS swapped */
157 {0, '\t'}, /* 0x10 shift TAB */
170 {0, '\r'}, /* return */
195 {S
, 0x4a}, /* HOME */
196 {0, '\b'}, /* really DEL, BS & DEL swapped */
197 {S
, 0x43}, /* 0x38 ROLLUP */
198 {S
, 0x3e}, /* ROLLDOWN */
199 {S
, 0x6a}, /* UNDO */
200 {D
, 0}, /* shift CRSR LEFT */
201 {D
, 0}, /* shift CRSR UP */
202 {D
, 0}, /* shift CRSR RIGHT */
203 {D
, 0}, /* shift CRSR DOWN */
219 {K
, '\r'}, /* enter */
225 {S
, 0x64}, /* HELP */
235 {S
, 0x39}, /* INS: not used */
240 {S
, 0x00}, /* shift F1 */
241 {S
, 0x04}, /* shift F2 */
242 {S
, 0x08}, /* shift F3 */
243 {S
, 0x0c}, /* shift F4 */
244 {S
, 0x10}, /* shift F5 */
245 {S
, 0x16}, /* shift F6 */
246 {S
, 0x1c}, /* shift F7 */
247 {S
, 0x22}, /* 0x68 shift F8 */
248 {S
, 0x28}, /* shift F9 */
249 {S
, 0x2e}, /* shift F10 */
262 /* string table. If there's a better way to get the offsets into the
263 above table, please tell me..
265 NOTE: save yourself and others a lot of grief by *not* using
266 CSI == 0x9b, using the two-character sequence gives
267 much less trouble, especially in GNU-Emacs.. */
269 3, ESC
, 'O', 'P', /* 0x00: F1 (k1) */
270 3, ESC
, 'O', 'Q', /* 0x04: F2 (k2) */
271 3, ESC
, 'O', 'R', /* 0x08: F3 (k3) */
272 3, ESC
, 'O', 'S', /* 0x0c: F4 (k4) */
273 5, ESC
, '[', '1', '7', '~', /* 0x10: F5 (k5) */
274 5, ESC
, '[', '1', '8', '~', /* 0x16: F6 (k6) */
275 5, ESC
, '[', '1', '9', '~', /* 0x1c: F7 (k7) */
276 5, ESC
, '[', '2', '0', '~', /* 0x22: F8 (k8) */
277 5, ESC
, '[', '2', '1', '~', /* 0x28: F9 (k9) */
278 5, ESC
, '[', '2', '9', '~', /* 0x2e: F10 (k;) */
280 4, ESC
, '[', '3', '~', /* 0x34: DEL (kD) */
281 4, ESC
, '[', '2', '~', /* 0x39: INS (kI) */
282 4, ESC
, '[', '6', '~', /* 0x3e: RDN (kN) */
283 4, ESC
, '[', '5', '~', /* 0x43: RUP (kP) */
284 1, 8, /* 0x48: BS (kb) */
286 4, ESC
, '[', '1', '~', /* 0x4a: HOME (kh) */
287 3, ESC
, '[', 'B', /* 0x4f: down (kd) */
288 3, ESC
, '[', 'D', /* 0x53: left (kl) */
289 3, ESC
, '[', 'C', /* 0x57: right (kr) */
290 3, ESC
, '[', 'A', /* 0x5b: up (ku) */
292 4, ESC
, '[', '9', '~', /* 0x5f: CLR (kC) */
293 5, ESC
, '[', '2', '8', '~', /* 0x64: HELP (kq) */
294 4, ESC
, '[', '7', '~', /* 0x6a: UNDO */
298 unsigned char acctable
[KBD_NUM_ACC
][64] = {