Expand PMF_FN_* macros.
[netbsd-mini2440.git] / sys / dev / pckbport / wskbdmap_mfii.c
blobb5320adbed89f412f80bd39ee23bdbf9f60b9f1a
1 /* $NetBSD: wskbdmap_mfii.c,v 1.18 2009/06/13 20:21:56 tonnerre Exp $ */
3 /*-
4 * Copyright (c) 1997 The NetBSD Foundation, Inc.
5 * All rights reserved.
7 * This code is derived from software contributed to The NetBSD Foundation
8 * by Juergen Hannken-Illjes.
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.
19 * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
20 * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
21 * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
22 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
23 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
24 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
25 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
26 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
27 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
28 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
29 * POSSIBILITY OF SUCH DAMAGE.
32 #include <sys/cdefs.h>
33 __KERNEL_RCSID(0, "$NetBSD: wskbdmap_mfii.c,v 1.18 2009/06/13 20:21:56 tonnerre Exp $");
35 #include "opt_wskbdmap.h"
36 #include <sys/types.h>
37 #include <dev/wscons/wsksymdef.h>
38 #include <dev/wscons/wsksymvar.h>
39 #include <dev/pckbport/wskbdmap_mfii.h>
41 #define KC(n) KS_KEYCODE(n)
43 static const keysym_t pckbd_keydesc_us[] = {
44 /* pos command normal shifted */
45 KC(1), KS_Cmd_Debugger, KS_Escape,
46 KC(2), KS_1, KS_exclam,
47 KC(3), KS_2, KS_at,
48 KC(4), KS_3, KS_numbersign,
49 KC(5), KS_4, KS_dollar,
50 KC(6), KS_5, KS_percent,
51 KC(7), KS_6, KS_asciicircum,
52 KC(8), KS_7, KS_ampersand,
53 KC(9), KS_8, KS_asterisk,
54 KC(10), KS_9, KS_parenleft,
55 KC(11), KS_0, KS_parenright,
56 KC(12), KS_minus, KS_underscore,
57 KC(13), KS_equal, KS_plus,
58 KC(14), KS_Cmd_ResetEmul, KS_Delete,
59 KC(15), KS_Tab,
60 KC(16), KS_q,
61 KC(17), KS_w,
62 KC(18), KS_e,
63 KC(19), KS_r,
64 KC(20), KS_t,
65 KC(21), KS_y,
66 KC(22), KS_u,
67 KC(23), KS_i,
68 KC(24), KS_o,
69 KC(25), KS_p,
70 KC(26), KS_bracketleft, KS_braceleft,
71 KC(27), KS_bracketright, KS_braceright,
72 KC(28), KS_Return,
73 KC(29), KS_Cmd1, KS_Control_L,
74 KC(30), KS_a,
75 KC(31), KS_s,
76 KC(32), KS_d,
77 KC(33), KS_f,
78 KC(34), KS_g,
79 KC(35), KS_h,
80 KC(36), KS_j,
81 KC(37), KS_k,
82 KC(38), KS_l,
83 KC(39), KS_semicolon, KS_colon,
84 KC(40), KS_apostrophe, KS_quotedbl,
85 KC(41), KS_grave, KS_asciitilde,
86 KC(42), KS_Shift_L,
87 KC(43), KS_backslash, KS_bar,
88 KC(44), KS_z,
89 KC(45), KS_x,
90 KC(46), KS_c,
91 KC(47), KS_v,
92 KC(48), KS_b,
93 KC(49), KS_n,
94 KC(50), KS_m,
95 KC(51), KS_comma, KS_less,
96 KC(52), KS_period, KS_greater,
97 KC(53), KS_slash, KS_question,
98 KC(54), KS_Shift_R,
99 KC(55), KS_KP_Multiply,
100 KC(56), KS_Cmd2, KS_Alt_L,
101 KC(57), KS_space,
102 KC(58), KS_Caps_Lock,
103 KC(59), KS_Cmd_Screen0, KS_f1,
104 KC(60), KS_Cmd_Screen1, KS_f2,
105 KC(61), KS_Cmd_Screen2, KS_f3,
106 KC(62), KS_Cmd_Screen3, KS_f4,
107 KC(63), KS_Cmd_Screen4, KS_f5,
108 KC(64), KS_Cmd_Screen5, KS_f6,
109 KC(65), KS_Cmd_Screen6, KS_f7,
110 KC(66), KS_Cmd_Screen7, KS_f8,
111 KC(67), KS_Cmd_Screen8, KS_f9,
112 KC(68), KS_Cmd_Screen9, KS_f10,
113 KC(69), KS_Num_Lock,
114 KC(70), KS_Hold_Screen,
115 KC(71), KS_KP_Home, KS_KP_7,
116 KC(72), KS_KP_Up, KS_KP_8,
117 KC(73), KS_Cmd_ScrollFastUp, KS_KP_Prior, KS_KP_9,
118 KC(74), KS_KP_Subtract,
119 KC(75), KS_KP_Left, KS_KP_4,
120 KC(76), KS_KP_Begin, KS_KP_5,
121 KC(77), KS_KP_Right, KS_KP_6,
122 KC(78), KS_KP_Add,
123 KC(79), KS_KP_End, KS_KP_1,
124 KC(80), KS_KP_Down, KS_KP_2,
125 KC(81), KS_Cmd_ScrollFastDown, KS_KP_Next, KS_KP_3,
126 KC(82), KS_KP_Insert, KS_KP_0,
127 KC(83), KS_KP_Delete, KS_KP_Decimal,
128 KC(87), KS_f11,
129 KC(88), KS_f12,
130 KC(127), KS_Pause, /* Break */
131 KC(156), KS_KP_Enter,
132 KC(157), KS_Control_R,
133 KC(160), KS_Cmd_VolumeToggle,
134 KC(170), KS_Print_Screen,
135 KC(174), KS_Cmd_VolumeDown,
136 KC(176), KS_Cmd_VolumeUp,
137 KC(181), KS_KP_Divide,
138 KC(183), KS_Print_Screen,
139 KC(184), KS_Alt_R, KS_Multi_key,
140 #if 0
141 KC(198), KS_Cmd_ResetClose, /* CTL-Break */
142 #endif
143 KC(199), KS_Home,
144 KC(200), KS_Up,
145 KC(201), KS_Cmd_ScrollFastUp, KS_Prior,
146 KC(203), KS_Left,
147 KC(205), KS_Right,
148 KC(207), KS_End,
149 KC(208), KS_Down,
150 KC(209), KS_Cmd_ScrollFastDown, KS_Next,
151 KC(210), KS_Insert,
152 KC(211), KS_Delete,
153 KC(219), KS_Meta_L,
154 KC(220), KS_Meta_R,
155 KC(221), KS_Menu,
158 #ifndef WSKBD_USONLY
159 static const keysym_t pckbd_keydesc_gr[] = {
160 /* pos normal shifted altgr shift-altgr */
161 KC(14), KS_Delete, KS_BackSpace,
162 KC(16), KS_q, KS_Q, KS_semicolon, KS_colon,
163 KC(17), KS_w, KS_W, KS_gr_teliko_s, KS_gr_S,
164 KC(18), KS_e, KS_E, KS_gr_e, KS_gr_E,
165 KC(19), KS_r, KS_R, KS_gr_r, KS_gr_R,
166 KC(20), KS_t, KS_T, KS_gr_t, KS_gr_T,
167 KC(21), KS_y, KS_Y, KS_gr_y, KS_gr_Y,
168 KC(22), KS_u, KS_U, KS_gr_u, KS_gr_U,
169 KC(23), KS_i, KS_I, KS_gr_i, KS_gr_I,
170 KC(24), KS_o, KS_O, KS_gr_o, KS_gr_O,
171 KC(25), KS_p, KS_P, KS_gr_p, KS_gr_P,
172 KC(30), KS_a, KS_A, KS_gr_a, KS_gr_A,
173 KC(31), KS_s, KS_S, KS_gr_s, KS_gr_S,
174 KC(32), KS_d, KS_D, KS_gr_d, KS_gr_D,
175 KC(33), KS_f, KS_F, KS_gr_f, KS_gr_F,
176 KC(34), KS_g, KS_G, KS_gr_g, KS_gr_G,
177 KC(35), KS_h, KS_H, KS_gr_h, KS_gr_H,
178 KC(36), KS_j, KS_J, KS_gr_j, KS_gr_J,
179 KC(37), KS_k, KS_K, KS_gr_k, KS_gr_K,
180 KC(38), KS_l, KS_L, KS_gr_l, KS_gr_L,
181 KC(39), KS_semicolon, KS_colon, KS_dead_semi, KS_dead_colon,
182 KC(44), KS_z, KS_Z, KS_gr_z, KS_gr_Z,
183 KC(45), KS_x, KS_X, KS_gr_x, KS_gr_X,
184 KC(46), KS_c, KS_C, KS_gr_c, KS_gr_C,
185 KC(47), KS_v, KS_V, KS_gr_v, KS_gr_V,
186 KC(48), KS_b, KS_B, KS_gr_b, KS_gr_B,
187 KC(49), KS_n, KS_N, KS_gr_n, KS_gr_N,
188 KC(50), KS_m, KS_M, KS_gr_m, KS_gr_M,
189 KC(184), KS_Mode_switch, KS_Multi_key,
192 static const keysym_t pckbd_keydesc_de[] = {
193 /* pos normal shifted altgr shift-altgr */
194 KC(3), KS_2, KS_quotedbl, KS_twosuperior,
195 KC(4), KS_3, KS_section, KS_threesuperior,
196 KC(7), KS_6, KS_ampersand,
197 KC(8), KS_7, KS_slash, KS_braceleft,
198 KC(9), KS_8, KS_parenleft, KS_bracketleft,
199 KC(10), KS_9, KS_parenright, KS_bracketright,
200 KC(11), KS_0, KS_equal, KS_braceright,
201 KC(12), KS_ssharp, KS_question, KS_backslash,
202 KC(13), KS_dead_acute, KS_dead_grave,
203 KC(16), KS_q, KS_Q, KS_at,
204 KC(21), KS_z,
205 KC(26), KS_udiaeresis,
206 KC(27), KS_plus, KS_asterisk, KS_dead_tilde,
207 KC(39), KS_odiaeresis,
208 KC(40), KS_adiaeresis,
209 KC(41), KS_dead_circumflex,KS_dead_abovering,
210 KC(43), KS_numbersign, KS_apostrophe,
211 KC(44), KS_y,
212 KC(50), KS_m, KS_M, KS_mu,
213 KC(51), KS_comma, KS_semicolon,
214 KC(52), KS_period, KS_colon,
215 KC(53), KS_minus, KS_underscore,
216 KC(83), KS_KP_Delete, KS_KP_Separator,
217 KC(86), KS_less, KS_greater, KS_bar, KS_brokenbar,
218 KC(184), KS_Mode_switch, KS_Multi_key,
221 static const keysym_t pckbd_keydesc_de_nodead[] = {
222 /* pos normal shifted altgr shift-altgr */
223 KC(13), KS_apostrophe, KS_grave,
224 KC(27), KS_plus, KS_asterisk, KS_asciitilde,
225 KC(41), KS_asciicircum, KS_degree,
228 static const keysym_t pckbd_keydesc_sg[] = {
229 /* pos normal shifted altgr shift-altgr */
230 KC(2), KS_1, KS_plus, KS_bar,
231 KC(3), KS_2, KS_quotedbl, KS_at,
232 KC(4), KS_3, KS_asterisk, KS_numbersign,
233 KC(5), KS_4, KS_ccedilla,
234 KC(7), KS_6, KS_ampersand, KS_notsign,
235 KC(8), KS_7, KS_slash, KS_brokenbar,
236 KC(9), KS_8, KS_parenleft, KS_cent,
237 KC(10), KS_9, KS_parenright,
238 KC(11), KS_0, KS_equal,
239 KC(12), KS_apostrophe, KS_question, KS_dead_acute,
240 KC(13), KS_dead_circumflex,KS_dead_grave, KS_dead_tilde,
241 KC(18), KS_e, KS_E, KS_currency,
242 KC(21), KS_z,
243 KC(26), KS_udiaeresis, KS_egrave, KS_bracketleft,
244 KC(27), KS_dead_diaeresis, KS_exclam, KS_bracketright,
245 KC(39), KS_odiaeresis, KS_eacute,
246 KC(40), KS_adiaeresis, KS_agrave, KS_braceleft,
247 KC(41), KS_section, KS_degree, KS_dead_abovering,
248 KC(43), KS_dollar, KS_sterling, KS_braceright,
249 KC(44), KS_y,
250 KC(51), KS_comma, KS_semicolon,
251 KC(52), KS_period, KS_colon,
252 KC(53), KS_minus, KS_underscore,
253 KC(86), KS_less, KS_greater, KS_backslash,
254 KC(184), KS_Mode_switch, KS_Multi_key,
257 static const keysym_t pckbd_keydesc_sg_nodead[] = {
258 /* pos normal shifted altgr shift-altgr */
259 KC(12), KS_apostrophe, KS_question, KS_acute,
260 KC(13), KS_asciicircum, KS_grave, KS_asciitilde,
261 KC(27), KS_diaeresis, KS_exclam, KS_bracketright
264 static const keysym_t pckbd_keydesc_sf[] = {
265 /* pos normal shifted altgr shift-altgr */
266 KC(26), KS_egrave, KS_udiaeresis, KS_bracketleft,
267 KC(39), KS_eacute, KS_odiaeresis,
268 KC(40), KS_agrave, KS_adiaeresis, KS_braceleft
271 static const keysym_t pckbd_keydesc_dk[] = {
272 /* pos normal shifted altgr shift-altgr */
273 KC(3), KS_2, KS_quotedbl, KS_at,
274 KC(4), KS_3, KS_numbersign, KS_sterling,
275 KC(5), KS_4, KS_currency, KS_dollar,
276 KC(7), KS_6, KS_ampersand,
277 KC(8), KS_7, KS_slash, KS_braceleft,
278 KC(9), KS_8, KS_parenleft, KS_bracketleft,
279 KC(10), KS_9, KS_parenright, KS_bracketright,
280 KC(11), KS_0, KS_equal, KS_braceright,
281 KC(12), KS_plus, KS_question,
282 KC(13), KS_dead_acute, KS_dead_grave, KS_bar,
283 KC(26), KS_aring,
284 KC(27), KS_dead_diaeresis, KS_dead_circumflex, KS_dead_tilde,
285 KC(39), KS_ae,
286 KC(40), KS_oslash,
287 KC(41), KS_onehalf, KS_paragraph,
288 KC(43), KS_apostrophe, KS_asterisk,
289 KC(51), KS_comma, KS_semicolon,
290 KC(52), KS_period, KS_colon,
291 KC(53), KS_minus, KS_underscore,
292 KC(86), KS_less, KS_greater, KS_backslash,
293 KC(184), KS_Mode_switch, KS_Multi_key,
296 static const keysym_t pckbd_keydesc_dk_nodead[] = {
297 /* pos normal shifted altgr shift-altgr */
298 KC(13), KS_apostrophe, KS_grave, KS_bar,
299 KC(27), KS_diaeresis, KS_asciicircum, KS_asciitilde,
302 static const keysym_t pckbd_keydesc_sv[] = {
303 /* pos normal shifted altgr shift-altgr */
304 KC(12), KS_plus, KS_question, KS_backslash,
305 KC(27), KS_dead_diaeresis, KS_dead_circumflex, KS_dead_tilde,
306 KC(39), KS_odiaeresis,
307 KC(40), KS_adiaeresis,
308 KC(41), KS_paragraph, KS_onehalf,
309 KC(86), KS_less, KS_greater, KS_bar,
310 KC(184), KS_Mode_switch, KS_Multi_key,
313 static const keysym_t pckbd_keydesc_sv_nodead[] = {
314 /* pos normal shifted altgr shift-altgr */
315 KC(13), KS_apostrophe, KS_grave, KS_bar,
316 KC(27), KS_diaeresis, KS_asciicircum, KS_asciitilde,
319 static const keysym_t pckbd_keydesc_no[] = {
320 /* pos normal shifted altgr shift-altgr */
321 KC(13), KS_backslash, KS_dead_grave, KS_dead_acute,
322 KC(27), KS_dead_diaeresis, KS_dead_circumflex, KS_dead_tilde,
323 KC(39), KS_oslash,
324 KC(40), KS_ae,
325 KC(41), KS_bar, KS_paragraph,
326 KC(86), KS_less, KS_greater,
329 static const keysym_t pckbd_keydesc_no_nodead[] = {
330 /* pos normal shifted altgr shift-altgr */
331 KC(13), KS_backslash, KS_grave, KS_acute,
332 KC(27), KS_diaeresis, KS_asciicircum, KS_asciitilde,
335 static const keysym_t pckbd_keydesc_fr[] = {
336 /* pos normal shifted altgr shift-altgr */
337 KC(2), KS_ampersand, KS_1,
338 KC(3), KS_eacute, KS_2, KS_asciitilde,
339 KC(4), KS_quotedbl, KS_3, KS_numbersign,
340 KC(5), KS_apostrophe, KS_4, KS_braceleft,
341 KC(6), KS_parenleft, KS_5, KS_bracketleft,
342 KC(7), KS_minus, KS_6, KS_bar,
343 KC(8), KS_egrave, KS_7, KS_grave,
344 KC(9), KS_underscore, KS_8, KS_backslash,
345 KC(10), KS_ccedilla, KS_9, KS_asciicircum,
346 KC(11), KS_agrave, KS_0, KS_at,
347 KC(12), KS_parenright, KS_degree, KS_bracketright,
348 KC(13), KS_equal, KS_plus, KS_braceright,
349 KC(16), KS_a,
350 KC(17), KS_z,
351 KC(26), KS_dead_circumflex, KS_dead_diaeresis,
352 KC(27), KS_dollar, KS_sterling, KS_currency,
353 KC(30), KS_q,
354 KC(39), KS_m,
355 KC(40), KS_ugrave, KS_percent,
356 KC(41), KS_twosuperior, KS_asciitilde,
357 KC(43), KS_asterisk, KS_mu,
358 KC(44), KS_w,
359 KC(50), KS_comma, KS_question,
360 KC(51), KS_semicolon, KS_period,
361 KC(52), KS_colon, KS_slash,
362 KC(53), KS_exclam, KS_section,
363 KC(86), KS_less, KS_greater,
364 KC(184), KS_Mode_switch, KS_Multi_key,
367 static const keysym_t pckbd_keydesc_it[] = {
368 /* pos normal shifted altgr shift-altgr */
369 KC(3), KS_2, KS_quotedbl, KS_twosuperior,
370 KC(4), KS_3, KS_sterling, KS_threesuperior,
371 KC(5), KS_4, KS_dollar,
372 KC(6), KS_5, KS_percent,
373 KC(7), KS_6, KS_ampersand,
374 KC(8), KS_7, KS_slash,
375 KC(9), KS_8, KS_parenleft,
376 KC(10), KS_9, KS_parenright,
377 KC(11), KS_0, KS_equal,
378 KC(12), KS_apostrophe, KS_question,
379 KC(13), KS_igrave, KS_asciicircum,
380 KC(26), KS_egrave, KS_eacute, KS_braceleft, KS_bracketleft,
381 KC(27), KS_plus, KS_asterisk, KS_braceright, KS_bracketright,
382 KC(39), KS_ograve, KS_Ccedilla, KS_at,
383 KC(40), KS_agrave, KS_degree, KS_numbersign,
384 KC(41), KS_backslash, KS_bar,
385 KC(43), KS_ugrave, KS_section,
386 KC(51), KS_comma, KS_semicolon,
387 KC(52), KS_period, KS_colon,
388 KC(53), KS_minus, KS_underscore,
389 KC(86), KS_less, KS_greater,
390 KC(184), KS_Mode_switch, KS_Multi_key,
393 static const keysym_t pckbd_keydesc_uk[] = {
394 /* pos normal shifted altgr shift-altgr */
395 KC(2), KS_1, KS_exclam, KS_plusminus, KS_exclamdown,
396 KC(3), KS_2, KS_quotedbl, KS_twosuperior, KS_cent,
397 KC(4), KS_3, KS_sterling, KS_threesuperior,
398 KC(5), KS_4, KS_dollar, KS_acute, KS_currency,
399 KC(6), KS_5, KS_percent, KS_mu, KS_yen,
400 KC(7), KS_6, KS_asciicircum, KS_paragraph,
401 KC(8), KS_7, KS_ampersand, KS_periodcentered, KS_brokenbar,
402 KC(9), KS_8, KS_asterisk, KS_cedilla, KS_ordfeminine,
403 KC(10), KS_9, KS_parenleft, KS_onesuperior, KS_diaeresis,
404 KC(11), KS_0, KS_parenright, KS_masculine, KS_copyright,
405 KC(12), KS_minus, KS_underscore, KS_hyphen, KS_ssharp,
406 KC(13), KS_equal, KS_plus, KS_onehalf, KS_guillemotleft,
407 KC(40), KS_apostrophe, KS_at, KS_section, KS_Agrave,
408 KC(41), KS_grave, KS_grave, KS_agrave, KS_agrave,
409 KC(43), KS_numbersign, KS_asciitilde, KS_sterling, KS_thorn,
410 KC(86), KS_backslash, KS_bar, KS_Udiaeresis,
413 static const keysym_t pckbd_keydesc_jp[] = {
414 /* pos normal shifted altgr shift-altgr */
415 KC(3), KS_2, KS_quotedbl,
416 KC(7), KS_6, KS_ampersand,
417 KC(8), KS_7, KS_apostrophe,
418 KC(9), KS_8, KS_parenleft,
419 KC(10), KS_9, KS_parenright,
420 KC(11), KS_0,
421 KC(12), KS_minus, KS_equal,
422 KC(13), KS_asciicircum, KS_asciitilde,
423 KC(26), KS_at, KS_grave,
424 KC(27), KS_bracketleft, KS_braceleft,
425 KC(39), KS_semicolon, KS_plus,
426 KC(40), KS_colon, KS_asterisk,
427 KC(41), KS_Zenkaku_Hankaku, /* replace grave/tilde */
428 KC(43), KS_bracketright, KS_braceright,
429 KC(112), KS_Hiragana_Katakana,
430 KC(115), KS_backslash, KS_underscore,
431 KC(121), KS_Henkan,
432 KC(123), KS_Muhenkan,
433 KC(125), KS_backslash, KS_bar,
436 static const keysym_t pckbd_keydesc_es[] = {
437 /* pos normal shifted altgr shift-altgr */
438 KC(2), KS_1, KS_exclam, KS_bar,
439 KC(3), KS_2, KS_quotedbl, KS_at,
440 KC(4), KS_3, KS_periodcentered, KS_numbersign,
441 KC(5), KS_4, KS_dollar, KS_asciitilde,
442 KC(7), KS_6, KS_ampersand, KS_notsign,
443 KC(8), KS_7, KS_slash,
444 KC(9), KS_8, KS_parenleft,
445 KC(10), KS_9, KS_parenright,
446 KC(11), KS_0, KS_equal,
447 KC(12), KS_apostrophe, KS_question,
448 KC(13), KS_exclamdown, KS_questiondown,
449 KC(18), KS_e, KS_E, KS_currency,
450 KC(26), KS_dead_grave, KS_dead_circumflex, KS_bracketleft,
451 KC(27), KS_plus, KS_asterisk, KS_bracketright,
452 KC(39), KS_ntilde,
453 KC(40), KS_dead_acute, KS_dead_diaeresis, KS_braceleft,
454 KC(41), KS_degree, KS_ordfeminine, KS_backslash,
455 KC(43), KS_ccedilla, KS_Ccedilla, KS_braceright,
456 KC(46), KS_c, KS_C, KS_cent,
457 KC(51), KS_comma, KS_semicolon,
458 KC(52), KS_period, KS_colon,
459 KC(53), KS_minus, KS_underscore,
460 KC(86), KS_less, KS_greater,
461 KC(184), KS_Mode_switch, KS_Multi_key,
464 static const keysym_t pckbd_keydesc_cz[] = {
465 /* pos normal shifted altgr shift-altgr */
466 KC(2), KS_plus, KS_1, KS_asciitilde,
467 KC(3), KS_ecaron, KS_2, KS_dead_caron,
468 KC(4), KS_scaron, KS_3, KS_dead_circumflex,
469 KC(5), KS_ccaron, KS_4, KS_dead_breve,
470 KC(6), KS_rcaron, KS_5, KS_dead_abovering,
471 KC(7), KS_zcaron, KS_6, KS_dead_ogonek,
472 KC(8), KS_yacute, KS_7, KS_dead_grave,
473 KC(9), KS_aacute, KS_8, KS_dead_dotaccent,
474 KC(10), KS_iacute, KS_9, KS_dead_acute,
475 KC(11), KS_eacute, KS_0, KS_dead_hungarumlaut,
476 KC(12), KS_equal, KS_percent, KS_dead_diaeresis,
477 KC(13), KS_dead_acute, KS_dead_caron, KS_dead_cedilla,
478 KC(26), KS_uacute, KS_slash,
479 KC(27), KS_adiaeresis, KS_parenleft, KS_multiply,
480 KC(39), KS_uabovering, KS_quotedbl, KS_dollar,
481 KC(40), KS_section, KS_exclam, KS_ssharp,
482 KC(41), KS_ncaron, KS_parenright, KS_currency,
483 KC(51), KS_comma, KS_question,
484 KC(52), KS_period, KS_colon,
485 KC(53), KS_minus, KS_underscore,
486 KC(86), KS_ampersand, KS_asterisk, KS_less,
487 KC(16), KS_q, KS_Q, KS_backslash,
488 KC(17), KS_w, KS_W, KS_bar,
489 KC(31), KS_s, KS_S, KS_dstroke,
490 KC(32), KS_d, KS_D, KS_Dstroke,
491 KC(33), KS_f, KS_F, KS_bracketleft,
492 KC(34), KS_g, KS_G, KS_bracketright,
493 KC(37), KS_k, KS_K, KS_lstroke,
494 KC(38), KS_l, KS_L, KS_Lstroke,
495 KC(44), KS_z, KS_Z, KS_greater,
496 KC(45), KS_x, KS_X, KS_numbersign,
497 KC(47), KS_v, KS_V, KS_at,
498 KC(48), KS_b, KS_B, KS_braceleft,
499 KC(49), KS_n, KS_N, KS_braceright,
500 KC(184), KS_Mode_switch, KS_Multi_key,
503 static const keysym_t pckbd_keydesc_pt[] = {
504 /* pos normal shifted altgr shift-altgr */
505 KC(3), KS_2, KS_quotedbl, KS_at,
506 KC(4), KS_3, KS_numbersign, KS_sterling,
507 KC(5), KS_4, KS_dollar, KS_section,
508 KC(7), KS_6, KS_ampersand,
509 KC(8), KS_7, KS_slash, KS_braceleft,
510 KC(9), KS_8, KS_parenleft, KS_bracketleft,
511 KC(10), KS_9, KS_parenright, KS_bracketright,
512 KC(11), KS_0, KS_equal, KS_braceright,
513 KC(12), KS_apostrophe, KS_question,
514 KC(13), KS_guillemotleft, KS_guillemotright,
515 KC(26), KS_plus, KS_asterisk, KS_dead_diaeresis,
516 KC(27), KS_dead_acute, KS_dead_grave,
517 KC(39), KS_ccedilla, KS_Ccedilla,
518 KC(40), KS_masculine, KS_ordfeminine,
519 KC(41), KS_backslash, KS_bar,
520 KC(43), KS_dead_tilde, KS_dead_circumflex,
521 KC(51), KS_comma, KS_semicolon,
522 KC(52), KS_period, KS_colon,
523 KC(53), KS_minus, KS_underscore,
524 KC(86), KS_less, KS_greater,
525 KC(184), KS_Mode_switch, KS_Multi_key,
528 static const keysym_t pckbd_keydesc_hu[] = {
529 /* pos normal shifted altgr shift-altgr */
530 KC(2), KS_1, KS_apostrophe, KS_asciitilde,
531 KC(3), KS_2, KS_quotedbl, KS_dead_caron,
532 KC(4), KS_3, KS_plus, KS_asciicircum,
533 KC(5), KS_4, KS_exclam, KS_dead_breve,
534 KC(6), KS_5, KS_percent, KS_dead_abovering,
535 KC(7), KS_6, KS_slash, KS_dead_ogonek,
536 KC(8), KS_7, KS_equal, KS_grave,
537 KC(9), KS_8, KS_parenleft, KS_dead_dotaccent,
538 KC(10), KS_9, KS_parenright, KS_dead_acute,
539 KC(11), KS_odiaeresis, KS_Odiaeresis, KS_dead_hungarumlaut,
540 KC(12), KS_udiaeresis, KS_Udiaeresis, KS_dead_diaeresis,
541 KC(13), KS_oacute, KS_Oacute, KS_dead_cedilla,
542 KC(16), KS_q, KS_Q, KS_backslash,
543 KC(17), KS_w, KS_W, KS_bar,
544 KC(21), KS_z,
545 KC(26), KS_odoubleacute, KS_Odoubleacute,KS_division,
546 KC(27), KS_uacute, KS_Uacute, KS_multiply,
547 KC(33), KS_f, KS_F, KS_bracketleft,
548 KC(34), KS_g, KS_G, KS_bracketright,
549 KC(39), KS_eacute, KS_Eacute, KS_dollar,
550 KC(40), KS_aacute, KS_Aacute, KS_ssharp,
551 KC(41), KS_0, KS_section,
552 KC(43), KS_udoubleacute, KS_Udoubleacute,KS_currency,
553 KC(44), KS_y, KS_Y, KS_greater,
554 KC(45), KS_x, KS_X, KS_numbersign,
555 KC(46), KS_c, KS_C, KS_ampersand,
556 KC(47), KS_v, KS_V, KS_at,
557 KC(48), KS_b, KS_B, KS_braceleft,
558 KC(49), KS_n, KS_N, KS_braceright,
559 KC(51), KS_comma, KS_question, KS_semicolon,
560 KC(52), KS_period, KS_colon,
561 KC(53), KS_minus, KS_underscore, KS_asterisk,
562 KC(86), KS_iacute, KS_Iacute, KS_less,
563 KC(184), KS_Mode_switch, KS_Multi_key,
566 static const keysym_t pckbd_keydesc_us_declk[] = {
567 /* pos normal shifted altgr shift-altgr */
568 KC(1), KS_grave, KS_asciitilde, /* replace escape */
569 KC(41), KS_less, KS_greater, /* replace grave/tilde */
570 KC(143), KS_Multi_key, /* left compose */
571 KC(157), KS_Multi_key, /* right compose, replace right control */
572 KC(87), KS_Cmd_Debugger, KS_Escape, /* replace F11 */
573 KC(189), KS_f13,
574 KC(190), KS_f14,
575 KC(191), KS_Help,
576 KC(192), KS_Execute,
577 KC(193), KS_f17,
578 KC(183), KS_f18,
579 KC(70), KS_f19, /* replace scroll lock */
580 KC(127), KS_f20, /* replace break */
581 KC(69), KS_KP_F1, /* replace num lock */
582 KC(181), KS_KP_F2, /* replace divide */
583 KC(55), KS_KP_F3, /* replace multiply */
584 KC(74), KS_KP_F4, /* replace subtract */
586 /* keypad is numbers only - no num lock */
587 KC(71), KS_KP_7,
588 KC(72), KS_KP_8,
589 KC(73), KS_KP_9,
590 KC(75), KS_KP_4,
591 KC(76), KS_KP_5,
592 KC(77), KS_KP_6,
593 KC(79), KS_KP_1,
594 KC(80), KS_KP_2,
595 KC(81), KS_KP_3,
596 KC(82), KS_KP_0,
597 KC(83), KS_KP_Decimal,
599 KC(206), KS_KP_Subtract,
600 KC(78), KS_KP_Separator, /* replace add */
601 KC(199), KS_Find, /* replace home */
602 KC(207), KS_Select, /* replace end */
605 static const keysym_t pckbd_keydesc_us_dvorak[] = {
606 /* pos command normal shifted */
607 KC(12), KS_bracketleft, KS_braceleft,
608 KC(13), KS_bracketright, KS_braceright,
609 KC(16), KS_apostrophe, KS_quotedbl,
610 KC(17), KS_comma, KS_less,
611 KC(18), KS_period, KS_greater,
612 KC(19), KS_p,
613 KC(20), KS_y,
614 KC(21), KS_f,
615 KC(22), KS_g,
616 KC(23), KS_c,
617 KC(24), KS_r,
618 KC(25), KS_l,
619 KC(26), KS_slash, KS_question,
620 KC(27), KS_equal, KS_plus,
621 KC(31), KS_o,
622 KC(32), KS_e,
623 KC(33), KS_u,
624 KC(34), KS_i,
625 KC(35), KS_d,
626 KC(36), KS_h,
627 KC(37), KS_t,
628 KC(38), KS_n,
629 KC(39), KS_s,
630 KC(40), KS_minus, KS_underscore,
631 KC(44), KS_semicolon, KS_colon,
632 KC(45), KS_q,
633 KC(46), KS_j,
634 KC(47), KS_k,
635 KC(48), KS_x,
636 KC(49), KS_b,
637 KC(51), KS_w,
638 KC(52), KS_v,
639 KC(53), KS_z,
642 static const keysym_t pckbd_keydesc_us_colemak[] = {
643 /* pos command normal shifted */
644 KC(41), KS_grave, KS_asciitilde, KS_dead_tilde, KS_asciitilde,
645 KC(2), KS_1, KS_exclam, KS_exclamdown, KS_onesuperior,
646 KC(3), KS_2, KS_at, KS_masculine, KS_twosuperior,
647 KC(4), KS_3, KS_numbersign, KS_ordfeminine, KS_threesuperior,
648 KC(5), KS_4, KS_dollar, KS_cent, KS_sterling,
649 KC(6), KS_5, KS_percent, KS_asciitilde, KS_yen,
650 KC(7), KS_6, KS_asciicircum, KS_asciitilde, KS_asciitilde,
651 KC(8), KS_7, KS_ampersand, KS_eth, KS_ETH,
652 KC(9), KS_8, KS_asterisk, KS_thorn, KS_THORN,
653 KC(10), KS_9, KS_parenleft, KS_asciitilde, KS_asciitilde,
654 KC(11), KS_0, KS_parenright, KS_asciitilde, KS_asciitilde,
655 KC(12), KS_minus, KS_underscore, KS_asciitilde, KS_asciitilde,
656 KC(13), KS_equal, KS_plus, KS_multiply, KS_division,
657 KC(16), KS_q, KS_Q, KS_adiaeresis, KS_Adiaeresis,
658 KC(17), KS_w, KS_W, KS_aring, KS_Aring,
659 KC(18), KS_f, KS_F, KS_atilde, KS_Atilde,
660 KC(19), KS_p, KS_P, KS_oslash, KS_Ooblique,
661 KC(20), KS_g, KS_G, KS_asciitilde, KS_asciitilde,
662 KC(21), KS_j, KS_J, KS_asciitilde, KS_asciitilde,
663 KC(22), KS_l, KS_L, KS_asciitilde, KS_asciitilde,
664 KC(23), KS_u, KS_U, KS_uacute, KS_Uacute,
665 KC(24), KS_y, KS_Y, KS_udiaeresis, KS_Udiaeresis,
666 KC(25), KS_semicolon, KS_colon, KS_odiaeresis, KS_Odiaeresis,
667 KC(26), KS_bracketleft, KS_braceleft, KS_guillemotleft, KS_asciitilde,
668 KC(27), KS_bracketright, KS_braceright, KS_guillemotright, KS_asciitilde,
669 KC(43), KS_backslash, KS_bar, KS_asciitilde, KS_asciitilde,
670 KC(30), KS_a, KS_A, KS_aacute, KS_Aacute,
671 KC(31), KS_r, KS_R, KS_dead_grave, KS_asciitilde,
672 KC(32), KS_s, KS_S, KS_ssharp, KS_asciitilde,
673 KC(33), KS_t, KS_T, KS_dead_acute, KS_asciitilde,
674 KC(34), KS_d, KS_D, KS_dead_diaeresis, KS_asciitilde,
675 KC(35), KS_h, KS_H, KS_asciitilde, KS_asciitilde,
676 KC(36), KS_n, KS_N, KS_ntilde, KS_Ntilde,
677 KC(37), KS_e, KS_E, KS_eacute, KS_Eacute,
678 KC(38), KS_i, KS_I, KS_iacute, KS_Iacute,
679 KC(39), KS_o, KS_O, KS_oacute, KS_Oacute,
680 KC(40), KS_apostrophe, KS_quotedbl, KS_otilde, KS_Otilde,
681 KC(44), KS_z, KS_Z, KS_ae, KS_AE,
682 KC(45), KS_x, KS_X, KS_dead_circumflex, KS_asciitilde,
683 KC(46), KS_c, KS_C, KS_ccedilla, KS_Ccedilla,
684 KC(47), KS_v, KS_V, KS_asciitilde, KS_asciitilde,
685 KC(48), KS_b, KS_B, KS_asciitilde, KS_asciitilde,
686 KC(49), KS_k, KS_K, KS_asciitilde, KS_asciitilde,
687 KC(50), KS_m, KS_M, KS_asciitilde, KS_asciitilde,
688 KC(51), KS_comma, KS_less, KS_dead_cedilla, KS_asciitilde,
689 KC(52), KS_period, KS_greater, KS_asciitilde, KS_asciitilde,
690 KC(53), KS_slash, KS_question, KS_questiondown, KS_asciitilde,
691 KC(58), KS_BackSpace,
692 KC(86), KS_minus, KS_underscore, KS_asciitilde, KS_asciitilde,
693 KC(57), KS_space, KS_space, KS_space, KS_nobreakspace,
694 KC(184), KS_Mode_switch, KS_Multi_key,
697 static const keysym_t pckbd_keydesc_swapctrlcaps[] = {
698 /* pos command normal shifted */
699 KC(29), KS_Caps_Lock,
700 KC(58), KS_Cmd1, KS_Control_L,
703 static const keysym_t pckbd_keydesc_iopener[] = {
704 /* pos command normal shifted */
705 KC(59), KS_Cmd_Debugger, KS_Escape,
706 KC(60), KS_Cmd_Screen0, KS_f1,
707 KC(61), KS_Cmd_Screen1, KS_f2,
708 KC(62), KS_Cmd_Screen2, KS_f3,
709 KC(63), KS_Cmd_Screen3, KS_f4,
710 KC(64), KS_Cmd_Screen4, KS_f5,
711 KC(65), KS_Cmd_Screen5, KS_f6,
712 KC(66), KS_Cmd_Screen6, KS_f7,
713 KC(67), KS_Cmd_Screen7, KS_f8,
714 KC(68), KS_Cmd_Screen8, KS_f9,
715 KC(87), KS_Cmd_Screen9, KS_f10,
716 KC(88), KS_f11,
718 #endif /* WSKBD_USONLY */
720 #define KBD_MAP(name, base, map) \
721 { name, base, sizeof(map)/sizeof(keysym_t), map }
722 /* KBD_NULLMAP generates a entry for machine native variant.
723 the entry will be modified by machine dependent keyboard driver. */
724 #define KBD_NULLMAP(name, base) { name, base, 0, 0 }
726 const struct wscons_keydesc pckbd_keydesctab[] = {
727 KBD_MAP(KB_US, 0, pckbd_keydesc_us),
728 #ifndef WSKBD_USONLY
729 KBD_MAP(KB_DE, KB_US, pckbd_keydesc_de),
730 KBD_MAP(KB_DE | KB_NODEAD, KB_DE, pckbd_keydesc_de_nodead),
731 KBD_MAP(KB_SG, KB_US, pckbd_keydesc_sg),
732 KBD_MAP(KB_SG | KB_NODEAD, KB_SG, pckbd_keydesc_sg_nodead),
733 KBD_MAP(KB_SF, KB_SG, pckbd_keydesc_sf),
734 KBD_MAP(KB_SF | KB_NODEAD, KB_SF, pckbd_keydesc_sg_nodead),
735 KBD_MAP(KB_FR, KB_US, pckbd_keydesc_fr),
736 KBD_MAP(KB_DK, KB_US, pckbd_keydesc_dk),
737 KBD_MAP(KB_DK | KB_NODEAD, KB_DK, pckbd_keydesc_dk_nodead),
738 KBD_MAP(KB_IT, KB_US, pckbd_keydesc_it),
739 KBD_MAP(KB_UK, KB_US, pckbd_keydesc_uk),
740 KBD_MAP(KB_JP, KB_US, pckbd_keydesc_jp),
741 KBD_MAP(KB_SV, KB_DK, pckbd_keydesc_sv),
742 KBD_MAP(KB_SV | KB_NODEAD, KB_SV, pckbd_keydesc_sv_nodead),
743 KBD_MAP(KB_NO, KB_DK, pckbd_keydesc_no),
744 KBD_MAP(KB_NO | KB_NODEAD, KB_NO, pckbd_keydesc_no_nodead),
745 KBD_MAP(KB_US | KB_DECLK, KB_US, pckbd_keydesc_us_declk),
746 KBD_MAP(KB_US | KB_DVORAK, KB_US, pckbd_keydesc_us_dvorak),
747 KBD_MAP(KB_US | KB_COLEMAK, KB_US, pckbd_keydesc_us_colemak),
748 KBD_MAP(KB_US | KB_SWAPCTRLCAPS, KB_US, pckbd_keydesc_swapctrlcaps),
749 KBD_MAP(KB_US | KB_IOPENER, KB_US, pckbd_keydesc_iopener),
750 KBD_MAP(KB_JP | KB_SWAPCTRLCAPS, KB_JP, pckbd_keydesc_swapctrlcaps),
751 KBD_MAP(KB_FR | KB_SWAPCTRLCAPS, KB_FR, pckbd_keydesc_swapctrlcaps),
752 KBD_MAP(KB_US | KB_DVORAK | KB_SWAPCTRLCAPS, KB_US | KB_DVORAK,
753 pckbd_keydesc_swapctrlcaps),
754 KBD_MAP(KB_US | KB_IOPENER | KB_SWAPCTRLCAPS, KB_US | KB_IOPENER,
755 pckbd_keydesc_swapctrlcaps),
756 KBD_MAP(KB_ES , KB_US, pckbd_keydesc_es),
757 KBD_MAP(KB_PT, KB_US, pckbd_keydesc_pt),
758 KBD_MAP(KB_GR, KB_US, pckbd_keydesc_gr),
759 KBD_MAP(KB_CZ, KB_US, pckbd_keydesc_cz),
760 KBD_MAP(KB_HU, KB_US, pckbd_keydesc_hu),
761 #endif /* WSKBD_USONLY */
763 /* placeholders */
764 KBD_NULLMAP(KB_US | KB_MACHDEP, KB_US),
765 #ifndef WSKBD_USONLY
766 KBD_NULLMAP(KB_DE | KB_MACHDEP, KB_DE),
767 KBD_NULLMAP(KB_SG | KB_MACHDEP, KB_SG),
768 KBD_NULLMAP(KB_ES | KB_MACHDEP, KB_ES),
769 KBD_NULLMAP(KB_FR | KB_MACHDEP, KB_FR),
770 KBD_NULLMAP(KB_JP | KB_MACHDEP, KB_JP),
771 KBD_NULLMAP(KB_US | KB_MACHDEP | KB_SWAPCTRLCAPS,
772 KB_US | KB_SWAPCTRLCAPS),
773 KBD_NULLMAP(KB_JP | KB_MACHDEP | KB_SWAPCTRLCAPS,
774 KB_JP | KB_SWAPCTRLCAPS),
775 #endif /* WSKBD_USONLY */
777 {0, 0, 0, 0}
780 #undef KBD_MAP
781 #undef KC