wskbdmap_mfii.c revision 1.10.8.1 1 /* $NetBSD: wskbdmap_mfii.c,v 1.10.8.1 2006/04/11 11:55:18 yamt Exp $ */
2
3 /*-
4 * Copyright (c) 1997 The NetBSD Foundation, Inc.
5 * All rights reserved.
6 *
7 * This code is derived from software contributed to The NetBSD Foundation
8 * by Juergen Hannken-Illjes.
9 *
10 * Redistribution and use in source and binary forms, with or without
11 * modification, are permitted provided that the following conditions
12 * are met:
13 * 1. Redistributions of source code must retain the above copyright
14 * notice, this list of conditions and the following disclaimer.
15 * 2. Redistributions in binary form must reproduce the above copyright
16 * notice, this list of conditions and the following disclaimer in the
17 * documentation and/or other materials provided with the distribution.
18 * 3. All advertising materials mentioning features or use of this software
19 * must display the following acknowledgement:
20 * This product includes software developed by the NetBSD
21 * Foundation, Inc. and its contributors.
22 * 4. Neither the name of The NetBSD Foundation nor the names of its
23 * contributors may be used to endorse or promote products derived
24 * from this software without specific prior written permission.
25 *
26 * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
27 * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
28 * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
29 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
30 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
31 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
32 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
33 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
34 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
35 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
36 * POSSIBILITY OF SUCH DAMAGE.
37 */
38
39 #include <sys/cdefs.h>
40 __KERNEL_RCSID(0, "$NetBSD: wskbdmap_mfii.c,v 1.10.8.1 2006/04/11 11:55:18 yamt Exp $");
41
42 #include <sys/types.h>
43 #include <dev/wscons/wsksymdef.h>
44 #include <dev/wscons/wsksymvar.h>
45 #include <dev/pckbport/wskbdmap_mfii.h>
46
47 #define KC(n) KS_KEYCODE(n)
48
49 static const keysym_t pckbd_keydesc_us[] = {
50 /* pos command normal shifted */
51 KC(1), KS_Cmd_Debugger, KS_Escape,
52 KC(2), KS_1, KS_exclam,
53 KC(3), KS_2, KS_at,
54 KC(4), KS_3, KS_numbersign,
55 KC(5), KS_4, KS_dollar,
56 KC(6), KS_5, KS_percent,
57 KC(7), KS_6, KS_asciicircum,
58 KC(8), KS_7, KS_ampersand,
59 KC(9), KS_8, KS_asterisk,
60 KC(10), KS_9, KS_parenleft,
61 KC(11), KS_0, KS_parenright,
62 KC(12), KS_minus, KS_underscore,
63 KC(13), KS_equal, KS_plus,
64 KC(14), KS_Cmd_ResetEmul, KS_Delete,
65 KC(15), KS_Tab,
66 KC(16), KS_q,
67 KC(17), KS_w,
68 KC(18), KS_e,
69 KC(19), KS_r,
70 KC(20), KS_t,
71 KC(21), KS_y,
72 KC(22), KS_u,
73 KC(23), KS_i,
74 KC(24), KS_o,
75 KC(25), KS_p,
76 KC(26), KS_bracketleft, KS_braceleft,
77 KC(27), KS_bracketright, KS_braceright,
78 KC(28), KS_Return,
79 KC(29), KS_Cmd1, KS_Control_L,
80 KC(30), KS_a,
81 KC(31), KS_s,
82 KC(32), KS_d,
83 KC(33), KS_f,
84 KC(34), KS_g,
85 KC(35), KS_h,
86 KC(36), KS_j,
87 KC(37), KS_k,
88 KC(38), KS_l,
89 KC(39), KS_semicolon, KS_colon,
90 KC(40), KS_apostrophe, KS_quotedbl,
91 KC(41), KS_grave, KS_asciitilde,
92 KC(42), KS_Shift_L,
93 KC(43), KS_backslash, KS_bar,
94 KC(44), KS_z,
95 KC(45), KS_x,
96 KC(46), KS_c,
97 KC(47), KS_v,
98 KC(48), KS_b,
99 KC(49), KS_n,
100 KC(50), KS_m,
101 KC(51), KS_comma, KS_less,
102 KC(52), KS_period, KS_greater,
103 KC(53), KS_slash, KS_question,
104 KC(54), KS_Shift_R,
105 KC(55), KS_KP_Multiply,
106 KC(56), KS_Cmd2, KS_Alt_L,
107 KC(57), KS_space,
108 KC(58), KS_Caps_Lock,
109 KC(59), KS_Cmd_Screen0, KS_f1,
110 KC(60), KS_Cmd_Screen1, KS_f2,
111 KC(61), KS_Cmd_Screen2, KS_f3,
112 KC(62), KS_Cmd_Screen3, KS_f4,
113 KC(63), KS_Cmd_Screen4, KS_f5,
114 KC(64), KS_Cmd_Screen5, KS_f6,
115 KC(65), KS_Cmd_Screen6, KS_f7,
116 KC(66), KS_Cmd_Screen7, KS_f8,
117 KC(67), KS_Cmd_Screen8, KS_f9,
118 KC(68), KS_Cmd_Screen9, KS_f10,
119 KC(69), KS_Num_Lock,
120 KC(70), KS_Hold_Screen,
121 KC(71), KS_KP_Home, KS_KP_7,
122 KC(72), KS_KP_Up, KS_KP_8,
123 KC(73), KS_Cmd_ScrollFastUp, KS_KP_Prior, KS_KP_9,
124 KC(74), KS_KP_Subtract,
125 KC(75), KS_KP_Left, KS_KP_4,
126 KC(76), KS_KP_Begin, KS_KP_5,
127 KC(77), KS_KP_Right, KS_KP_6,
128 KC(78), KS_KP_Add,
129 KC(79), KS_KP_End, KS_KP_1,
130 KC(80), KS_KP_Down, KS_KP_2,
131 KC(81), KS_Cmd_ScrollFastDown, KS_KP_Next, KS_KP_3,
132 KC(82), KS_KP_Insert, KS_KP_0,
133 KC(83), KS_KP_Delete, KS_KP_Decimal,
134 KC(87), KS_f11,
135 KC(88), KS_f12,
136 KC(127), KS_Pause, /* Break */
137 KC(156), KS_KP_Enter,
138 KC(157), KS_Control_R,
139 KC(170), KS_Print_Screen,
140 KC(181), KS_KP_Divide,
141 KC(183), KS_Print_Screen,
142 KC(184), KS_Alt_R, KS_Multi_key,
143 #if 0
144 KC(198), KS_Cmd_ResetClose, /* CTL-Break */
145 #endif
146 KC(199), KS_Home,
147 KC(200), KS_Up,
148 KC(201), KS_Cmd_ScrollFastUp, KS_Prior,
149 KC(203), KS_Left,
150 KC(205), KS_Right,
151 KC(207), KS_End,
152 KC(208), KS_Down,
153 KC(209), KS_Cmd_ScrollFastDown, KS_Next,
154 KC(210), KS_Insert,
155 KC(211), KS_Delete,
156 KC(219), KS_Meta_L,
157 KC(220), KS_Meta_R,
158 KC(221), KS_Menu,
159 };
160
161 #ifndef WSKBD_USONLY
162 static const keysym_t pckbd_keydesc_gr[] = {
163 /* pos normal shifted altgr shift-altgr */
164 KC(14), KS_Delete, KS_BackSpace,
165 KC(16), KS_q, KS_Q, KS_semicolon, KS_colon,
166 KC(17), KS_w, KS_W, KS_gr_teliko_s, KS_gr_S,
167 KC(18), KS_e, KS_E, KS_gr_e, KS_gr_E,
168 KC(19), KS_r, KS_R, KS_gr_r, KS_gr_R,
169 KC(20), KS_t, KS_T, KS_gr_t, KS_gr_T,
170 KC(21), KS_y, KS_Y, KS_gr_y, KS_gr_Y,
171 KC(22), KS_u, KS_U, KS_gr_u, KS_gr_U,
172 KC(23), KS_i, KS_I, KS_gr_i, KS_gr_I,
173 KC(24), KS_o, KS_O, KS_gr_o, KS_gr_O,
174 KC(25), KS_p, KS_P, KS_gr_p, KS_gr_P,
175 KC(30), KS_a, KS_A, KS_gr_a, KS_gr_A,
176 KC(31), KS_s, KS_S, KS_gr_s, KS_gr_S,
177 KC(32), KS_d, KS_D, KS_gr_d, KS_gr_D,
178 KC(33), KS_f, KS_F, KS_gr_f, KS_gr_F,
179 KC(34), KS_g, KS_G, KS_gr_g, KS_gr_G,
180 KC(35), KS_h, KS_H, KS_gr_h, KS_gr_H,
181 KC(36), KS_j, KS_J, KS_gr_j, KS_gr_J,
182 KC(37), KS_k, KS_K, KS_gr_k, KS_gr_K,
183 KC(38), KS_l, KS_L, KS_gr_l, KS_gr_L,
184 KC(39), KS_semicolon, KS_colon, KS_dead_semi, KS_dead_colon,
185 KC(44), KS_z, KS_Z, KS_gr_z, KS_gr_Z,
186 KC(45), KS_x, KS_X, KS_gr_x, KS_gr_X,
187 KC(46), KS_c, KS_C, KS_gr_c, KS_gr_C,
188 KC(47), KS_v, KS_V, KS_gr_v, KS_gr_V,
189 KC(48), KS_b, KS_B, KS_gr_b, KS_gr_B,
190 KC(49), KS_n, KS_N, KS_gr_n, KS_gr_N,
191 KC(50), KS_m, KS_M, KS_gr_m, KS_gr_M,
192 KC(184), KS_Mode_switch, KS_Multi_key,
193 };
194
195 static const keysym_t pckbd_keydesc_de[] = {
196 /* pos normal shifted altgr shift-altgr */
197 KC(3), KS_2, KS_quotedbl, KS_twosuperior,
198 KC(4), KS_3, KS_section, KS_threesuperior,
199 KC(7), KS_6, KS_ampersand,
200 KC(8), KS_7, KS_slash, KS_braceleft,
201 KC(9), KS_8, KS_parenleft, KS_bracketleft,
202 KC(10), KS_9, KS_parenright, KS_bracketright,
203 KC(11), KS_0, KS_equal, KS_braceright,
204 KC(12), KS_ssharp, KS_question, KS_backslash,
205 KC(13), KS_dead_acute, KS_dead_grave,
206 KC(16), KS_q, KS_Q, KS_at,
207 KC(21), KS_z,
208 KC(26), KS_udiaeresis,
209 KC(27), KS_plus, KS_asterisk, KS_dead_tilde,
210 KC(39), KS_odiaeresis,
211 KC(40), KS_adiaeresis,
212 KC(41), KS_dead_circumflex,KS_dead_abovering,
213 KC(43), KS_numbersign, KS_apostrophe,
214 KC(44), KS_y,
215 KC(50), KS_m, KS_M, KS_mu,
216 KC(51), KS_comma, KS_semicolon,
217 KC(52), KS_period, KS_colon,
218 KC(53), KS_minus, KS_underscore,
219 KC(83), KS_KP_Delete, KS_KP_Separator,
220 KC(86), KS_less, KS_greater, KS_bar, KS_brokenbar,
221 KC(184), KS_Mode_switch, KS_Multi_key,
222 };
223
224 static const keysym_t pckbd_keydesc_de_nodead[] = {
225 /* pos normal shifted altgr shift-altgr */
226 KC(13), KS_apostrophe, KS_grave,
227 KC(27), KS_plus, KS_asterisk, KS_asciitilde,
228 KC(41), KS_asciicircum, KS_degree,
229 };
230
231 static const keysym_t pckbd_keydesc_dk[] = {
232 /* pos normal shifted altgr shift-altgr */
233 KC(3), KS_2, KS_quotedbl, KS_at,
234 KC(4), KS_3, KS_numbersign, KS_sterling,
235 KC(5), KS_4, KS_currency, KS_dollar,
236 KC(7), KS_6, KS_ampersand,
237 KC(8), KS_7, KS_slash, KS_braceleft,
238 KC(9), KS_8, KS_parenleft, KS_bracketleft,
239 KC(10), KS_9, KS_parenright, KS_bracketright,
240 KC(11), KS_0, KS_equal, KS_braceright,
241 KC(12), KS_plus, KS_question,
242 KC(13), KS_dead_acute, KS_dead_grave, KS_bar,
243 KC(26), KS_aring,
244 KC(27), KS_dead_diaeresis, KS_dead_circumflex, KS_dead_tilde,
245 KC(39), KS_ae,
246 KC(40), KS_oslash,
247 KC(41), KS_onehalf, KS_paragraph,
248 KC(43), KS_apostrophe, KS_asterisk,
249 KC(51), KS_comma, KS_semicolon,
250 KC(52), KS_period, KS_colon,
251 KC(53), KS_minus, KS_underscore,
252 KC(86), KS_less, KS_greater, KS_backslash,
253 KC(184), KS_Mode_switch, KS_Multi_key,
254 };
255
256 static const keysym_t pckbd_keydesc_dk_nodead[] = {
257 /* pos normal shifted altgr shift-altgr */
258 KC(13), KS_apostrophe, KS_grave, KS_bar,
259 KC(27), KS_diaeresis, KS_asciicircum, KS_asciitilde,
260 };
261
262 static const keysym_t pckbd_keydesc_sv[] = {
263 /* pos normal shifted altgr shift-altgr */
264 KC(12), KS_plus, KS_question, KS_backslash,
265 KC(27), KS_dead_diaeresis, KS_dead_circumflex, KS_dead_tilde,
266 KC(39), KS_odiaeresis,
267 KC(40), KS_adiaeresis,
268 KC(41), KS_paragraph, KS_onehalf,
269 KC(86), KS_less, KS_greater, KS_bar,
270 KC(184), KS_Mode_switch, KS_Multi_key,
271 };
272
273 static const keysym_t pckbd_keydesc_sv_nodead[] = {
274 /* pos normal shifted altgr shift-altgr */
275 KC(13), KS_apostrophe, KS_grave, KS_bar,
276 KC(27), KS_diaeresis, KS_asciicircum, KS_asciitilde,
277 };
278
279 static const keysym_t pckbd_keydesc_no[] = {
280 /* pos normal shifted altgr shift-altgr */
281 KC(13), KS_backslash, KS_dead_grave, KS_dead_acute,
282 KC(27), KS_dead_diaeresis, KS_dead_circumflex, KS_dead_tilde,
283 KC(39), KS_oslash,
284 KC(40), KS_ae,
285 KC(41), KS_bar, KS_paragraph,
286 KC(86), KS_less, KS_greater,
287 };
288
289 static const keysym_t pckbd_keydesc_no_nodead[] = {
290 /* pos normal shifted altgr shift-altgr */
291 KC(13), KS_backslash, KS_grave, KS_acute,
292 KC(27), KS_diaeresis, KS_asciicircum, KS_asciitilde,
293 };
294
295 static const keysym_t pckbd_keydesc_fr[] = {
296 /* pos normal shifted altgr shift-altgr */
297 KC(2), KS_ampersand, KS_1,
298 KC(3), KS_eacute, KS_2, KS_asciitilde,
299 KC(4), KS_quotedbl, KS_3, KS_numbersign,
300 KC(5), KS_apostrophe, KS_4, KS_braceleft,
301 KC(6), KS_parenleft, KS_5, KS_bracketleft,
302 KC(7), KS_minus, KS_6, KS_bar,
303 KC(8), KS_egrave, KS_7, KS_grave,
304 KC(9), KS_underscore, KS_8, KS_backslash,
305 KC(10), KS_ccedilla, KS_9, KS_asciicircum,
306 KC(11), KS_agrave, KS_0, KS_at,
307 KC(12), KS_parenright, KS_degree, KS_bracketright,
308 KC(13), KS_equal, KS_plus, KS_braceright,
309 KC(16), KS_a,
310 KC(17), KS_z,
311 KC(26), KS_dead_circumflex, KS_dead_diaeresis,
312 KC(27), KS_dollar, KS_sterling, KS_currency,
313 KC(30), KS_q,
314 KC(39), KS_m,
315 KC(40), KS_ugrave, KS_percent,
316 KC(41), KS_twosuperior, KS_asciitilde,
317 KC(43), KS_asterisk, KS_mu,
318 KC(44), KS_w,
319 KC(50), KS_comma, KS_question,
320 KC(51), KS_semicolon, KS_period,
321 KC(52), KS_colon, KS_slash,
322 KC(53), KS_exclam, KS_section,
323 KC(86), KS_less, KS_greater,
324 KC(184), KS_Mode_switch, KS_Multi_key,
325 };
326
327 static const keysym_t pckbd_keydesc_it[] = {
328 /* pos normal shifted altgr shift-altgr */
329 KC(3), KS_2, KS_quotedbl, KS_twosuperior,
330 KC(4), KS_3, KS_sterling, KS_threesuperior,
331 KC(5), KS_4, KS_dollar,
332 KC(6), KS_5, KS_percent,
333 KC(7), KS_6, KS_ampersand,
334 KC(8), KS_7, KS_slash,
335 KC(9), KS_8, KS_parenleft,
336 KC(10), KS_9, KS_parenright,
337 KC(11), KS_0, KS_equal,
338 KC(12), KS_apostrophe, KS_question,
339 KC(13), KS_igrave, KS_asciicircum,
340 KC(26), KS_egrave, KS_eacute, KS_braceleft, KS_bracketleft,
341 KC(27), KS_plus, KS_asterisk, KS_braceright, KS_bracketright,
342 KC(39), KS_ograve, KS_Ccedilla, KS_at,
343 KC(40), KS_agrave, KS_degree, KS_numbersign,
344 KC(41), KS_backslash, KS_bar,
345 KC(43), KS_ugrave, KS_section,
346 KC(51), KS_comma, KS_semicolon,
347 KC(52), KS_period, KS_colon,
348 KC(53), KS_minus, KS_underscore,
349 KC(86), KS_less, KS_greater,
350 KC(184), KS_Mode_switch, KS_Multi_key,
351 };
352
353 static const keysym_t pckbd_keydesc_uk[] = {
354 /* pos normal shifted altgr shift-altgr */
355 KC(2), KS_1, KS_exclam, KS_plusminus, KS_exclamdown,
356 KC(3), KS_2, KS_quotedbl, KS_twosuperior, KS_cent,
357 KC(4), KS_3, KS_sterling, KS_threesuperior,
358 KC(5), KS_4, KS_dollar, KS_acute, KS_currency,
359 KC(6), KS_5, KS_percent, KS_mu, KS_yen,
360 KC(7), KS_6, KS_asciicircum, KS_paragraph,
361 KC(8), KS_7, KS_ampersand, KS_periodcentered, KS_brokenbar,
362 KC(9), KS_8, KS_asterisk, KS_cedilla, KS_ordfeminine,
363 KC(10), KS_9, KS_parenleft, KS_onesuperior, KS_diaeresis,
364 KC(11), KS_0, KS_parenright, KS_masculine, KS_copyright,
365 KC(12), KS_minus, KS_underscore, KS_hyphen, KS_ssharp,
366 KC(13), KS_equal, KS_plus, KS_onehalf, KS_guillemotleft,
367 KC(40), KS_apostrophe, KS_at, KS_section, KS_Agrave,
368 KC(41), KS_grave, KS_grave, KS_agrave, KS_agrave,
369 KC(43), KS_numbersign, KS_asciitilde, KS_sterling, KS_thorn,
370 KC(86), KS_backslash, KS_bar, KS_Udiaeresis,
371 };
372
373 static const keysym_t pckbd_keydesc_jp[] = {
374 /* pos normal shifted altgr shift-altgr */
375 KC(3), KS_2, KS_quotedbl,
376 KC(7), KS_6, KS_ampersand,
377 KC(8), KS_7, KS_apostrophe,
378 KC(9), KS_8, KS_parenleft,
379 KC(10), KS_9, KS_parenright,
380 KC(11), KS_0,
381 KC(12), KS_minus, KS_equal,
382 KC(13), KS_asciicircum, KS_asciitilde,
383 KC(26), KS_at, KS_grave,
384 KC(27), KS_bracketleft, KS_braceleft,
385 KC(39), KS_semicolon, KS_plus,
386 KC(40), KS_colon, KS_asterisk,
387 KC(41), KS_Zenkaku_Hankaku, /* replace grave/tilde */
388 KC(43), KS_bracketright, KS_braceright,
389 KC(112), KS_Hiragana_Katakana,
390 KC(115), KS_backslash, KS_underscore,
391 KC(121), KS_Henkan,
392 KC(123), KS_Muhenkan,
393 KC(125), KS_backslash, KS_bar,
394 };
395
396 static const keysym_t pckbd_keydesc_es[] = {
397 /* pos normal shifted altgr shift-altgr */
398 KC(2), KS_1, KS_exclam, KS_bar,
399 KC(3), KS_2, KS_quotedbl, KS_at,
400 KC(4), KS_3, KS_periodcentered, KS_numbersign,
401 KC(5), KS_4, KS_dollar, KS_asciitilde,
402 KC(7), KS_6, KS_ampersand, KS_notsign,
403 KC(8), KS_7, KS_slash,
404 KC(9), KS_8, KS_parenleft,
405 KC(10), KS_9, KS_parenright,
406 KC(11), KS_0, KS_equal,
407 KC(12), KS_apostrophe, KS_question,
408 KC(13), KS_exclamdown, KS_questiondown,
409 KC(18), KS_e, KS_E, KS_currency,
410 KC(26), KS_dead_grave, KS_dead_circumflex, KS_bracketleft,
411 KC(27), KS_plus, KS_asterisk, KS_bracketright,
412 KC(39), KS_ntilde,
413 KC(40), KS_dead_acute, KS_dead_diaeresis, KS_braceleft,
414 KC(41), KS_degree, KS_ordfeminine, KS_backslash,
415 KC(43), KS_ccedilla, KS_Ccedilla, KS_braceright,
416 KC(46), KS_c, KS_C, KS_cent,
417 KC(51), KS_comma, KS_semicolon,
418 KC(52), KS_period, KS_colon,
419 KC(53), KS_minus, KS_underscore,
420 KC(86), KS_less, KS_greater,
421 KC(184), KS_Mode_switch, KS_Multi_key,
422 };
423
424 static const keysym_t pckbd_keydesc_pt[] = {
425 /* pos normal shifted altgr shift-altgr */
426 KC(3), KS_2, KS_quotedbl, KS_at,
427 KC(4), KS_3, KS_numbersign, KS_sterling,
428 KC(5), KS_4, KS_dollar, KS_section,
429 KC(7), KS_6, KS_ampersand,
430 KC(8), KS_7, KS_slash, KS_braceleft,
431 KC(9), KS_8, KS_parenleft, KS_bracketleft,
432 KC(10), KS_9, KS_parenright, KS_bracketright,
433 KC(11), KS_0, KS_equal, KS_braceright,
434 KC(12), KS_apostrophe, KS_question,
435 KC(13), KS_guillemotleft, KS_guillemotright,
436 KC(26), KS_plus, KS_asterisk, KS_dead_diaeresis,
437 KC(27), KS_dead_acute, KS_dead_grave,
438 KC(39), KS_ccedilla, KS_Ccedilla,
439 KC(40), KS_masculine, KS_ordfeminine,
440 KC(41), KS_backslash, KS_bar,
441 KC(43), KS_dead_tilde, KS_dead_circumflex,
442 KC(51), KS_comma, KS_semicolon,
443 KC(52), KS_period, KS_colon,
444 KC(53), KS_minus, KS_underscore,
445 KC(86), KS_less, KS_greater,
446 KC(184), KS_Mode_switch, KS_Multi_key,
447 };
448
449 static const keysym_t pckbd_keydesc_us_declk[] = {
450 /* pos normal shifted altgr shift-altgr */
451 KC(1), KS_grave, KS_asciitilde, /* replace escape */
452 KC(41), KS_less, KS_greater, /* replace grave/tilde */
453 KC(143), KS_Multi_key, /* left compose */
454 KC(157), KS_Multi_key, /* right compose, replace right control */
455 KC(87), KS_Cmd_Debugger, KS_Escape, /* replace F11 */
456 KC(189), KS_f13,
457 KC(190), KS_f14,
458 KC(191), KS_Help,
459 KC(192), KS_Execute,
460 KC(193), KS_f17,
461 KC(183), KS_f18,
462 KC(70), KS_f19, /* replace scroll lock */
463 KC(127), KS_f20, /* replace break */
464 KC(69), KS_KP_F1, /* replace num lock */
465 KC(181), KS_KP_F2, /* replace divide */
466 KC(55), KS_KP_F3, /* replace multiply */
467 KC(74), KS_KP_F4, /* replace subtract */
468
469 /* keypad is numbers only - no num lock */
470 KC(71), KS_KP_7,
471 KC(72), KS_KP_8,
472 KC(73), KS_KP_9,
473 KC(75), KS_KP_4,
474 KC(76), KS_KP_5,
475 KC(77), KS_KP_6,
476 KC(79), KS_KP_1,
477 KC(80), KS_KP_2,
478 KC(81), KS_KP_3,
479 KC(82), KS_KP_0,
480 KC(83), KS_KP_Decimal,
481
482 KC(206), KS_KP_Subtract,
483 KC(78), KS_KP_Separator, /* replace add */
484 KC(199), KS_Find, /* replace home */
485 KC(207), KS_Select, /* replace end */
486 };
487
488 static const keysym_t pckbd_keydesc_us_dvorak[] = {
489 /* pos command normal shifted */
490 KC(12), KS_bracketleft, KS_braceleft,
491 KC(13), KS_bracketright, KS_braceright,
492 KC(16), KS_apostrophe, KS_quotedbl,
493 KC(17), KS_comma, KS_less,
494 KC(18), KS_period, KS_greater,
495 KC(19), KS_p,
496 KC(20), KS_y,
497 KC(21), KS_f,
498 KC(22), KS_g,
499 KC(23), KS_c,
500 KC(24), KS_r,
501 KC(25), KS_l,
502 KC(26), KS_slash, KS_question,
503 KC(27), KS_equal, KS_plus,
504 KC(31), KS_o,
505 KC(32), KS_e,
506 KC(33), KS_u,
507 KC(34), KS_i,
508 KC(35), KS_d,
509 KC(36), KS_h,
510 KC(37), KS_t,
511 KC(38), KS_n,
512 KC(39), KS_s,
513 KC(40), KS_minus, KS_underscore,
514 KC(44), KS_semicolon, KS_colon,
515 KC(45), KS_q,
516 KC(46), KS_j,
517 KC(47), KS_k,
518 KC(48), KS_x,
519 KC(49), KS_b,
520 KC(51), KS_w,
521 KC(52), KS_v,
522 KC(53), KS_z,
523 };
524
525 static const keysym_t pckbd_keydesc_swapctrlcaps[] = {
526 /* pos command normal shifted */
527 KC(29), KS_Caps_Lock,
528 KC(58), KS_Cmd1, KS_Control_L,
529 };
530
531 static const keysym_t pckbd_keydesc_iopener[] = {
532 /* pos command normal shifted */
533 KC(59), KS_Cmd_Debugger, KS_Escape,
534 KC(60), KS_Cmd_Screen0, KS_f1,
535 KC(61), KS_Cmd_Screen1, KS_f2,
536 KC(62), KS_Cmd_Screen2, KS_f3,
537 KC(63), KS_Cmd_Screen3, KS_f4,
538 KC(64), KS_Cmd_Screen4, KS_f5,
539 KC(65), KS_Cmd_Screen5, KS_f6,
540 KC(66), KS_Cmd_Screen6, KS_f7,
541 KC(67), KS_Cmd_Screen7, KS_f8,
542 KC(68), KS_Cmd_Screen8, KS_f9,
543 KC(87), KS_Cmd_Screen9, KS_f10,
544 KC(88), KS_f11,
545 };
546 #endif /* WSKBD_USONLY */
547
548 #define KBD_MAP(name, base, map) \
549 { name, base, sizeof(map)/sizeof(keysym_t), map }
550 /* KBD_NULLMAP generates a entry for machine native variant.
551 the entry will be modified by machine dependent keyboard driver. */
552 #define KBD_NULLMAP(name, base) { name, base, 0, 0 }
553
554 const struct wscons_keydesc pckbd_keydesctab[] = {
555 KBD_MAP(KB_US, 0, pckbd_keydesc_us),
556 #ifndef WSKBD_USONLY
557 KBD_MAP(KB_DE, KB_US, pckbd_keydesc_de),
558 KBD_MAP(KB_DE | KB_NODEAD, KB_DE, pckbd_keydesc_de_nodead),
559 KBD_MAP(KB_FR, KB_US, pckbd_keydesc_fr),
560 KBD_MAP(KB_DK, KB_US, pckbd_keydesc_dk),
561 KBD_MAP(KB_DK | KB_NODEAD, KB_DK, pckbd_keydesc_dk_nodead),
562 KBD_MAP(KB_IT, KB_US, pckbd_keydesc_it),
563 KBD_MAP(KB_UK, KB_US, pckbd_keydesc_uk),
564 KBD_MAP(KB_JP, KB_US, pckbd_keydesc_jp),
565 KBD_MAP(KB_SV, KB_DK, pckbd_keydesc_sv),
566 KBD_MAP(KB_SV | KB_NODEAD, KB_SV, pckbd_keydesc_sv_nodead),
567 KBD_MAP(KB_NO, KB_DK, pckbd_keydesc_no),
568 KBD_MAP(KB_NO | KB_NODEAD, KB_NO, pckbd_keydesc_no_nodead),
569 KBD_MAP(KB_US | KB_DECLK, KB_US, pckbd_keydesc_us_declk),
570 KBD_MAP(KB_US | KB_DVORAK, KB_US, pckbd_keydesc_us_dvorak),
571 KBD_MAP(KB_US | KB_SWAPCTRLCAPS, KB_US, pckbd_keydesc_swapctrlcaps),
572 KBD_MAP(KB_US | KB_IOPENER, KB_US, pckbd_keydesc_iopener),
573 KBD_MAP(KB_JP | KB_SWAPCTRLCAPS, KB_JP, pckbd_keydesc_swapctrlcaps),
574 KBD_MAP(KB_FR | KB_SWAPCTRLCAPS, KB_FR, pckbd_keydesc_swapctrlcaps),
575 KBD_MAP(KB_US | KB_DVORAK | KB_SWAPCTRLCAPS, KB_US | KB_DVORAK,
576 pckbd_keydesc_swapctrlcaps),
577 KBD_MAP(KB_US | KB_IOPENER | KB_SWAPCTRLCAPS, KB_US | KB_IOPENER,
578 pckbd_keydesc_swapctrlcaps),
579 KBD_MAP(KB_ES , KB_US, pckbd_keydesc_es),
580 KBD_MAP(KB_PT, KB_US, pckbd_keydesc_pt),
581 KBD_MAP(KB_GR, KB_US, pckbd_keydesc_gr),
582 #endif /* WSKBD_USONLY */
583
584 /* placeholders */
585 KBD_NULLMAP(KB_US | KB_MACHDEP, KB_US),
586 #ifndef WSKBD_USONLY
587 KBD_NULLMAP(KB_DE | KB_MACHDEP, KB_DE),
588 KBD_NULLMAP(KB_ES | KB_MACHDEP, KB_ES),
589 KBD_NULLMAP(KB_FR | KB_MACHDEP, KB_FR),
590 KBD_NULLMAP(KB_JP | KB_MACHDEP, KB_JP),
591 KBD_NULLMAP(KB_US | KB_MACHDEP | KB_SWAPCTRLCAPS,
592 KB_US | KB_SWAPCTRLCAPS),
593 KBD_NULLMAP(KB_JP | KB_MACHDEP | KB_SWAPCTRLCAPS,
594 KB_JP | KB_SWAPCTRLCAPS),
595 #endif /* WSKBD_USONLY */
596
597 {0, 0, 0, 0}
598 };
599
600 #undef KBD_MAP
601 #undef KC
602