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