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