Expand PMF_FN_* macros.
[netbsd-mini2440.git] / sys / arch / x68k / usr.bin / loadkmap / jis_kmap.c
blobeb7331f76905da325ac2982ab0ba913d6fd24ba2
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 */
5 #include <sys/cdefs.h>
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
11 (later at least..) */
13 /* mode shortcuts: */
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 = {
20 /* normal map */
22 0, 0, /* 0x00 */
23 0, ESC,
24 0, '1',
25 0, '2',
26 0, '3',
27 0, '4',
28 0, '5',
29 0, '6',
30 0, '7', /* 0x08 */
31 0, '8',
32 0, '9',
33 0, '0',
34 0, '-',
35 0, '^',
36 0, '\\',
37 0, DEL, /* really BS, DEL & BS swapped */
38 0, '\t', /* 0x10 */
39 C, 'q',
40 C, 'w',
41 C, 'e',
42 C, 'r',
43 C, 't',
44 C, 'y',
45 C, 'u',
46 C, 'i', /* 0x18 */
47 C, 'o',
48 C, 'p',
49 0, '@',
50 0, '[',
51 0, '\r', /* return */
52 C, 'a',
53 C, 's',
54 C, 'd', /* 0x20 */
55 C, 'f',
56 C, 'g',
57 C, 'h',
58 C, 'j',
59 C, 'k',
60 C, 'l',
61 0, ';',
62 0, ':', /* 0x28 */
63 0, ']',
64 C, 'z',
65 C, 'x',
66 C, 'c',
67 C, 'v',
68 C, 'b',
69 C, 'n',
70 C, 'm', /* 0x30 */
71 0, ',',
72 0, '.',
73 0, '/',
74 0, '_',
75 0, ' ',
76 0, 0, /* HOME */
77 0, '\b', /* really DEL, BS & DEL swapped */
78 0, 0, /* 0x38 ROLLUP */
79 0, 0, /* ROLLDOWN */
80 0, 0, /* UNDO */
81 S, 0x0C, /* CRSR LEFT */
82 S, 0x00, /* now it gets hairy.. CRSR UP */
83 S, 0x08, /* CRSR RIGHT */
84 S, 0x04, /* CRSR DOWN */
85 0, 0, /* CLR */
86 K, '/', /* 0x40 */
87 K, '*',
88 K, '-',
89 K, '7',
90 K, '8',
91 K, '9',
92 K, '+',
93 K, '4',
94 K, '5', /* 0x48 */
95 K, '6',
96 K, '=',
97 K, '1',
98 K, '2',
99 K, '3',
100 K, '\r', /* enter */
101 K, '0',
102 K, ',', /* 0x50 */
103 K, '.',
104 0, 0,
105 0, 0,
106 S, 0x42, /* HELP */
107 0, 0,
108 0, 0,
109 0, 0,
110 0, 0, /* 0x58 */
111 0, 0,
112 0, 0,
113 0, 0,
114 0, 0,
115 0, 0,
116 0, 0,
117 0, 0,
118 0, 0, /* 0x60 */
119 0, 0,
120 0, 0,
121 S, 0x10, /* F1 */
122 S, 0x15, /* F2 */
123 S, 0x1A, /* F3 */
124 S, 0x1F, /* F4 */
125 S, 0x24, /* F5 */
126 S, 0x29, /* F6 */
127 S, 0x2E, /* F7 */
128 S, 0x33, /* 0x58 F8 */
129 S, 0x38, /* F9 */
130 S, 0x3D, /* F10 */
133 /* shifted map */
135 0, 0, /* 0x00 */
136 0, ESC,
137 0, '!',
138 0, '\"',
139 0, '#',
140 0, '$',
141 0, '%',
142 0, '&',
143 0, '\'', /* 0x08 */
144 0, '(',
145 0, ')',
146 0, 0,
147 0, '=',
148 0, '~',
149 0, '|',
150 0, DEL, /* really BS, DEL & BS swapped */
151 0, '\t', /* 0x10 shift TAB */
152 C, 'Q',
153 C, 'W',
154 C, 'E',
155 C, 'R',
156 C, 'T',
157 C, 'Y',
158 C, 'U',
159 C, 'I', /* 0x18 */
160 C, 'O',
161 C, 'P',
162 0, '`',
163 0, '{',
164 0, '\r', /* return */
165 C, 'A',
166 C, 'S',
167 C, 'D', /* 0x20 */
168 C, 'F',
169 C, 'G',
170 C, 'H',
171 C, 'J',
172 C, 'K',
173 C, 'L',
174 0, '+',
175 0, '*', /* 0x28 */
176 0, '}',
177 C, 'Z',
178 C, 'X',
179 C, 'C',
180 C, 'V',
181 C, 'B',
182 C, 'N',
183 C, 'M', /* 0x30 */
184 0, '<', /* 0x38 */
185 0, '>',
186 0, '?',
187 0, '_',
188 0, ' ',
189 0, 0, /* HOME */
190 0, '\b', /* really DEL, BS & DEL swapped */
191 0, 0, /* 0x38 ROLLUP */
192 0, 0, /* ROLLDOWN */
193 0, 0, /* UNDO */
194 0, 0, /* shift CRSR LEFT */
195 0, 0, /* shift CRSR UP */
196 0, 0, /* shift CRSR RIGHT */
197 0, 0, /* shift CRSR DOWN */
198 D, 0, /* CLR */
199 D, '/', /* 0x40 */
200 D, '*',
201 D, '-',
202 D, '7',
203 D, '8',
204 D, '9',
205 D, '+',
206 D, '4',
207 D, '5', /* 0x48 */
208 D, '6',
209 D, '=',
210 D, '1',
211 D, '2',
212 D, '3',
213 K, '\r', /* enter */
214 D, '0',
215 D, ',', /* 0x50 */
216 D, '.',
217 0, 0,
218 0, 0,
219 S, 0x42, /* HELP */
220 0, 0,
221 0, 0,
222 0, 0,
223 0, 0, /* 0x58 */
224 0, 0,
225 0, 0,
226 0, 0,
227 0, 0,
228 0, 0,
229 0, 0,
230 0, 0,
231 0, 0, /* 0x60 */
232 0, 0,
233 0, 0,
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 */
247 /* alt map */
251 /* shift alt map */
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 */