Sync usage with man page.
[netbsd-mini2440.git] / sys / dev / usb / ukbdmap.c
blob45a52192bfc109cc89eaa066c1c24c2eecf2324d
1 /* $NetBSD: ukbdmap.c,v 1.24 2009/09/04 16:54:32 dyoung Exp $ */
3 /*
4 * Copyright (c) 1999,2001 The NetBSD Foundation, Inc.
5 * All rights reserved.
7 * This code is derived from software contributed to The NetBSD Foundation
8 * by Lennart Augustsson (lennart@augustsson.net) at
9 * Carlstedt Research & Technology.
11 * Redistribution and use in source and binary forms, with or without
12 * modification, are permitted provided that the following conditions
13 * are met:
14 * 1. Redistributions of source code must retain the above copyright
15 * notice, this list of conditions and the following disclaimer.
16 * 2. Redistributions in binary form must reproduce the above copyright
17 * notice, this list of conditions and the following disclaimer in the
18 * documentation and/or other materials provided with the distribution.
20 * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
21 * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
22 * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
23 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
24 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
25 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
26 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
27 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
28 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
29 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
30 * POSSIBILITY OF SUCH DAMAGE.
33 #include <sys/cdefs.h>
34 __KERNEL_RCSID(0, "$NetBSD: ukbdmap.c,v 1.24 2009/09/04 16:54:32 dyoung Exp $");
36 #include <sys/types.h>
37 #include <dev/wscons/wsksymdef.h>
38 #include <dev/wscons/wsksymvar.h>
40 #include <dev/usb/usb.h>
42 #define KC(n) KS_KEYCODE(n)
44 Static const keysym_t ukbd_keydesc_us[] = {
45 /* pos command normal shifted */
46 KC(4), KS_a,
47 KC(5), KS_b,
48 KC(6), KS_c,
49 KC(7), KS_d,
50 KC(8), KS_e,
51 KC(9), KS_f,
52 KC(10), KS_g,
53 KC(11), KS_h,
54 KC(12), KS_i,
55 KC(13), KS_j,
56 KC(14), KS_k,
57 KC(15), KS_l,
58 KC(16), KS_m,
59 KC(17), KS_n,
60 KC(18), KS_o,
61 KC(19), KS_p,
62 KC(20), KS_q,
63 KC(21), KS_r,
64 KC(22), KS_s,
65 KC(23), KS_t,
66 KC(24), KS_u,
67 KC(25), KS_v,
68 KC(26), KS_w,
69 KC(27), KS_x,
70 KC(28), KS_y,
71 KC(29), KS_z,
72 KC(30), KS_1, KS_exclam,
73 KC(31), KS_2, KS_at,
74 KC(32), KS_3, KS_numbersign,
75 KC(33), KS_4, KS_dollar,
76 KC(34), KS_5, KS_percent,
77 KC(35), KS_6, KS_asciicircum,
78 KC(36), KS_7, KS_ampersand,
79 KC(37), KS_8, KS_asterisk,
80 KC(38), KS_9, KS_parenleft,
81 KC(39), KS_0, KS_parenright,
82 KC(40), KS_Return,
83 KC(41), KS_Cmd_Debugger, KS_Escape,
84 KC(42), KS_BackSpace,
85 KC(43), KS_Tab,
86 KC(44), KS_space,
87 KC(45), KS_minus, KS_underscore,
88 KC(46), KS_equal, KS_plus,
89 KC(47), KS_bracketleft, KS_braceleft,
90 KC(48), KS_bracketright,KS_braceright,
91 KC(49), KS_backslash, KS_bar,
92 KC(50), KS_backslash, KS_bar,
93 KC(51), KS_semicolon, KS_colon,
94 KC(52), KS_apostrophe, KS_quotedbl,
95 KC(53), KS_grave, KS_asciitilde,
96 KC(54), KS_comma, KS_less,
97 KC(55), KS_period, KS_greater,
98 KC(56), KS_slash, KS_question,
99 KC(57), KS_Caps_Lock,
100 KC(58), KS_Cmd_Screen0, KS_f1,
101 KC(59), KS_Cmd_Screen1, KS_f2,
102 KC(60), KS_Cmd_Screen2, KS_f3,
103 KC(61), KS_Cmd_Screen3, KS_f4,
104 KC(62), KS_Cmd_Screen4, KS_f5,
105 KC(63), KS_Cmd_Screen5, KS_f6,
106 KC(64), KS_Cmd_Screen6, KS_f7,
107 KC(65), KS_Cmd_Screen7, KS_f8,
108 KC(66), KS_Cmd_Screen8, KS_f9,
109 KC(67), KS_Cmd_Screen9, KS_f10,
110 KC(68), KS_f11,
111 KC(69), KS_f12,
112 KC(70), KS_Print_Screen,
113 KC(71), KS_Hold_Screen,
114 KC(72), KS_Pause,
115 KC(73), KS_Insert,
116 KC(74), KS_Home,
117 KC(75), KS_Cmd_ScrollFastUp, KS_Prior,
118 KC(76), KS_Delete,
119 KC(77), KS_End,
120 KC(78), KS_Cmd_ScrollFastDown, KS_Next,
121 KC(79), KS_Right,
122 KC(80), KS_Left,
123 KC(81), KS_Down,
124 KC(82), KS_Up,
125 KC(83), KS_Num_Lock,
126 KC(84), KS_KP_Divide,
127 KC(85), KS_KP_Multiply,
128 KC(86), KS_KP_Subtract,
129 KC(87), KS_KP_Add,
130 KC(88), KS_KP_Enter,
131 KC(89), KS_KP_End, KS_KP_1,
132 KC(90), KS_KP_Down, KS_KP_2,
133 KC(91), KS_Cmd_ScrollFastDown, KS_KP_Next, KS_KP_3,
134 KC(92), KS_KP_Left, KS_KP_4,
135 KC(93), KS_KP_Begin, KS_KP_5,
136 KC(94), KS_KP_Right, KS_KP_6,
137 KC(95), KS_KP_Home, KS_KP_7,
138 KC(96), KS_KP_Up, KS_KP_8,
139 KC(97), KS_Cmd_ScrollFastUp, KS_KP_Prior, KS_KP_9,
140 KC(98), KS_KP_Insert, KS_KP_0,
141 KC(99), KS_KP_Delete, KS_KP_Decimal,
142 KC(100), KS_backslash, KS_bar,
143 KC(101), KS_Menu,
144 /* ... */
145 KC(104), KS_f13,
146 KC(105), KS_f14,
147 KC(106), KS_f15,
148 KC(107), KS_f16,
149 /* ... */
150 KC(109), KS_Power,
151 /* ... many unmapped keys ... */
152 KC(224), KS_Cmd1, KS_Control_L,
153 KC(225), KS_Shift_L,
154 KC(226), KS_Cmd2, KS_Alt_L,
155 KC(227), KS_Meta_L,
156 KC(228), KS_Control_R,
157 KC(229), KS_Shift_R,
158 KC(230), KS_Alt_R, KS_Multi_key,
159 KC(231), KS_Meta_R,
162 Static const keysym_t ukbd_keydesc_jp[] = {
163 /* pos command normal shifted */
164 KC(31), KS_2, KS_quotedbl,
165 KC(35), KS_6, KS_ampersand,
166 KC(36), KS_7, KS_apostrophe,
167 KC(37), KS_8, KS_parenleft,
168 KC(38), KS_9, KS_parenright,
169 KC(39), KS_0,
170 KC(45), KS_minus, KS_equal,
171 KC(46), KS_asciicircum, KS_asciitilde,
172 KC(47), KS_at, KS_grave,
173 KC(48), KS_bracketleft, KS_braceleft,
174 KC(50), KS_bracketright, KS_braceright,
175 KC(51), KS_semicolon, KS_plus,
176 KC(52), KS_colon, KS_asterisk,
177 KC(53), KS_Zenkaku_Hankaku, /* replace grave/tilde */
178 KC(135), KS_backslash, KS_underscore,
179 KC(136), KS_Hiragana_Katakana,
180 KC(137), KS_backslash, KS_bar,
181 KC(138), KS_Henkan,
182 KC(139), KS_Muhenkan,
185 Static const keysym_t ukbd_keydesc_us_dvorak[] = {
186 /* pos command normal shifted */
187 KC(4), KS_a,
188 KC(5), KS_x,
189 KC(6), KS_j,
190 KC(7), KS_e,
191 KC(8), KS_period, KS_greater,
192 KC(9), KS_u,
193 KC(10), KS_i,
194 KC(11), KS_d,
195 KC(12), KS_c,
196 KC(13), KS_h,
197 KC(14), KS_t,
198 KC(15), KS_n,
199 KC(16), KS_m,
200 KC(17), KS_b,
201 KC(18), KS_r,
202 KC(19), KS_l,
203 KC(20), KS_apostrophe, KS_quotedbl,
204 KC(21), KS_p,
205 KC(22), KS_o,
206 KC(23), KS_y,
207 KC(24), KS_g,
208 KC(25), KS_k,
209 KC(26), KS_comma, KS_less,
210 KC(27), KS_q,
211 KC(28), KS_f,
212 KC(29), KS_semicolon, KS_colon,
213 KC(45), KS_bracketleft, KS_braceleft,
214 KC(46), KS_bracketright, KS_braceright,
215 KC(47), KS_slash, KS_question,
216 KC(48), KS_equal, KS_plus,
217 KC(51), KS_s,
218 KC(52), KS_minus, KS_underscore,
219 KC(54), KS_w,
220 KC(55), KS_v,
221 KC(56), KS_z,
224 Static const keysym_t ukbd_keydesc_us_colemak[] = {
225 /* pos command normal shifted */
226 KC(4), KS_a, KS_A, KS_aacute, KS_Aacute,
227 KC(5), KS_b, KS_B, KS_asciitilde, KS_asciitilde,
228 KC(6), KS_c, KS_C, KS_ccedilla, KS_Ccedilla,
229 KC(7), KS_s, KS_S, KS_ssharp, KS_asciitilde,
230 KC(8), KS_f, KS_F, KS_atilde, KS_Atilde,
231 KC(9), KS_t, KS_T, KS_dead_acute, KS_asciitilde,
232 KC(10), KS_d, KS_D, KS_dead_diaeresis, KS_asciitilde,
233 KC(11), KS_h, KS_H, KS_asciitilde, KS_asciitilde,
234 KC(12), KS_u, KS_U, KS_uacute, KS_Uacute,
235 KC(13), KS_n, KS_N, KS_ntilde, KS_Ntilde,
236 KC(14), KS_e, KS_E, KS_eacute, KS_Eacute,
237 KC(15), KS_i, KS_I, KS_iacute, KS_Iacute,
238 KC(16), KS_m, KS_M, KS_asciitilde, KS_asciitilde,
239 KC(17), KS_k, KS_K, KS_asciitilde, KS_asciitilde,
240 KC(18), KS_y, KS_Y, KS_udiaeresis, KS_Udiaeresis,
241 KC(19), KS_semicolon, KS_colon, KS_odiaeresis, KS_Odiaeresis,
242 KC(20), KS_q, KS_Q, KS_adiaeresis, KS_Adiaeresis,
243 KC(21), KS_p, KS_P, KS_oslash, KS_Ooblique,
244 KC(22), KS_r, KS_R, KS_dead_grave, KS_asciitilde,
245 KC(23), KS_g, KS_G, KS_asciitilde, KS_asciitilde,
246 KC(24), KS_l, KS_L, KS_asciitilde, KS_asciitilde,
247 KC(25), KS_v, KS_V, KS_asciitilde, KS_asciitilde,
248 KC(26), KS_w, KS_W, KS_aring, KS_Aring,
249 KC(27), KS_x, KS_X, KS_dead_circumflex, KS_asciitilde,
250 KC(28), KS_j, KS_J, KS_asciitilde, KS_asciitilde,
251 KC(29), KS_z, KS_Z, KS_ae, KS_AE,
252 KC(30), KS_1, KS_exclam, KS_exclamdown, KS_onesuperior,
253 KC(31), KS_2, KS_at, KS_masculine, KS_twosuperior,
254 KC(32), KS_3, KS_numbersign, KS_ordfeminine, KS_threesuperior,
255 KC(33), KS_4, KS_dollar, KS_cent, KS_sterling,
256 KC(34), KS_5, KS_percent, KS_asciitilde, KS_yen,
257 KC(35), KS_6, KS_asciicircum, KS_asciitilde, KS_asciitilde,
258 KC(36), KS_7, KS_ampersand, KS_eth, KS_ETH,
259 KC(37), KS_8, KS_asterisk, KS_thorn, KS_THORN,
260 KC(38), KS_9, KS_parenleft, KS_asciitilde, KS_asciitilde,
261 KC(39), KS_0, KS_parenright, KS_asciitilde, KS_asciitilde,
262 KC(44), KS_space, KS_space, KS_space, KS_nobreakspace,
263 KC(45), KS_minus, KS_underscore, KS_asciitilde, KS_asciitilde,
264 KC(46), KS_equal, KS_plus, KS_multiply, KS_division,
265 KC(47), KS_bracketleft, KS_braceleft, KS_guillemotleft, KS_asciitilde,
266 KC(48), KS_bracketright, KS_braceright, KS_guillemotright, KS_asciitilde,
267 KC(49), KS_backslash, KS_bar, KS_asciitilde, KS_asciitilde,
268 KC(50), KS_backslash, KS_bar, KS_asciitilde, KS_asciitilde,
269 KC(51), KS_o, KS_O, KS_oacute, KS_Oacute,
270 KC(52), KS_apostrophe, KS_quotedbl, KS_otilde, KS_Otilde,
271 KC(53), KS_grave, KS_asciitilde, KS_dead_tilde, KS_asciitilde,
272 KC(54), KS_comma, KS_less, KS_dead_cedilla, KS_asciitilde,
273 KC(55), KS_period, KS_greater, KS_asciitilde, KS_asciitilde,
274 KC(56), KS_slash, KS_question, KS_questiondown, KS_asciitilde,
275 KC(57), KS_BackSpace,
276 KC(100), KS_minus, KS_underscore, KS_asciitilde, KS_asciitilde,
277 KC(230), KS_Mode_switch, KS_Multi_key,
280 Static const keysym_t ukbd_keydesc_swapctrlcaps[] = {
281 /* pos command normal shifted */
282 KC(57), KS_Control_L,
283 KC(224), KS_Cmd1, KS_Caps_Lock,
286 Static const keysym_t ukbd_keydesc_de[] = {
287 /* pos normal shifted altgr shift-altgr */
288 KC(16), KS_m, KS_M, KS_mu,
289 KC(20), KS_q, KS_Q, KS_at,
290 KC(28), KS_z,
291 KC(29), KS_y,
292 KC(31), KS_2, KS_quotedbl, KS_twosuperior,
293 KC(32), KS_3, KS_section, KS_threesuperior,
294 KC(35), KS_6, KS_ampersand,
295 KC(36), KS_7, KS_slash, KS_braceleft,
296 KC(37), KS_8, KS_parenleft, KS_bracketleft,
297 KC(38), KS_9, KS_parenright, KS_bracketright,
298 KC(39), KS_0, KS_equal, KS_braceright,
299 KC(45), KS_ssharp, KS_question, KS_backslash,
300 KC(46), KS_dead_acute, KS_dead_grave,
301 KC(47), KS_udiaeresis,
302 KC(48), KS_plus, KS_asterisk, KS_dead_tilde,
303 KC(50), KS_numbersign, KS_apostrophe,
304 KC(51), KS_odiaeresis,
305 KC(52), KS_adiaeresis,
306 KC(53), KS_dead_circumflex,KS_dead_abovering,
307 KC(54), KS_comma, KS_semicolon,
308 KC(55), KS_period, KS_colon,
309 KC(56), KS_minus, KS_underscore,
310 KC(100), KS_less, KS_greater, KS_bar, KS_brokenbar,
311 KC(230), KS_Mode_switch, KS_Multi_key,
314 Static const keysym_t ukbd_keydesc_de_nodead[] = {
315 /* pos normal shifted altgr shift-altgr */
316 KC(46), KS_apostrophe, KS_grave,
317 KC(48), KS_plus, KS_asterisk, KS_asciitilde,
318 KC(53), KS_asciicircum, KS_degree,
321 Static const keysym_t ukbd_keydesc_dk[] = {
322 /* pos normal shifted altgr shift-altgr */
323 KC(31), KS_2, KS_quotedbl, KS_at,
324 KC(32), KS_3, KS_numbersign, KS_sterling,
325 KC(33), KS_4, KS_currency, KS_dollar,
326 KC(35), KS_6, KS_ampersand,
327 KC(36), KS_7, KS_slash, KS_braceleft,
328 KC(37), KS_8, KS_parenleft, KS_bracketleft,
329 KC(38), KS_9, KS_parenright, KS_bracketright,
330 KC(39), KS_0, KS_equal, KS_braceright,
331 KC(45), KS_plus, KS_question,
332 KC(46), KS_dead_acute, KS_dead_grave, KS_bar,
333 KC(47), KS_aring,
334 KC(48), KS_dead_diaeresis, KS_dead_circumflex, KS_dead_tilde,
335 KC(50), KS_apostrophe, KS_asterisk,
336 KC(51), KS_ae,
337 KC(52), KS_oslash,
338 KC(53), KS_onehalf, KS_paragraph,
339 KC(54), KS_comma, KS_semicolon,
340 KC(55), KS_period, KS_colon,
341 KC(56), KS_minus, KS_underscore,
342 KC(100), KS_less, KS_greater, KS_backslash,
343 KC(230), KS_Mode_switch, KS_Multi_key,
346 Static const keysym_t ukbd_keydesc_dk_nodead[] = {
347 /* pos normal shifted altgr shift-altgr */
348 KC(46), KS_apostrophe, KS_grave, KS_bar,
349 KC(48), KS_diaeresis, KS_asciicircum, KS_asciitilde,
352 Static const keysym_t ukbd_keydesc_sv[] = {
353 /* pos normal shifted altgr shift-altgr */
354 KC(45), KS_plus, KS_question, KS_backslash,
355 KC(48), KS_dead_diaeresis, KS_dead_circumflex, KS_dead_tilde,
356 KC(50), KS_apostrophe, KS_asterisk,
357 KC(51), KS_odiaeresis,
358 KC(52), KS_adiaeresis,
359 KC(53), KS_paragraph, KS_onehalf,
360 KC(100), KS_less, KS_greater, KS_bar,
361 KC(230), KS_Mode_switch, KS_Multi_key,
364 Static const keysym_t ukbd_keydesc_sv_nodead[] = {
365 /* pos normal shifted altgr shift-altgr */
366 KC(46), KS_apostrophe, KS_grave, KS_bar,
367 KC(48), KS_diaeresis, KS_asciicircum, KS_asciitilde,
370 Static const keysym_t ukbd_keydesc_no[] = {
371 /* pos normal shifted altgr shift-altgr */
372 KC(46), KS_backslash, KS_dead_grave, KS_dead_acute,
373 KC(48), KS_dead_diaeresis, KS_dead_circumflex, KS_dead_tilde,
374 KC(50), KS_comma, KS_asterisk,
375 KC(51), KS_oslash,
376 KC(52), KS_ae,
377 KC(53), KS_bar, KS_paragraph,
378 KC(100), KS_less, KS_greater,
381 Static const keysym_t ukbd_keydesc_no_nodead[] = {
382 /* pos normal shifted altgr shift-altgr */
383 KC(46), KS_backslash, KS_grave, KS_acute,
384 KC(48), KS_diaeresis, KS_asciicircum, KS_asciitilde,
387 Static const keysym_t ukbd_keydesc_fr[] = {
388 /* pos normal shifted altgr shift-altgr */
389 KC(4), KS_q,
390 KC(16), KS_comma, KS_question,
391 KC(20), KS_a,
392 KC(26), KS_z,
393 KC(29), KS_w,
394 KC(30), KS_ampersand, KS_1,
395 KC(31), KS_eacute, KS_2, KS_asciitilde,
396 KC(32), KS_quotedbl, KS_3, KS_numbersign,
397 KC(33), KS_apostrophe, KS_4, KS_braceleft,
398 KC(34), KS_parenleft, KS_5, KS_bracketleft,
399 KC(35), KS_minus, KS_6, KS_bar,
400 KC(36), KS_egrave, KS_7, KS_grave,
401 KC(37), KS_underscore, KS_8, KS_backslash,
402 KC(38), KS_ccedilla, KS_9, KS_asciicircum,
403 KC(39), KS_agrave, KS_0, KS_at,
404 KC(45), KS_parenright, KS_degree, KS_bracketright,
405 KC(46), KS_equal, KS_plus, KS_braceright,
406 KC(47), KS_dead_circumflex, KS_dead_diaeresis,
407 KC(48), KS_dollar, KS_sterling, KS_currency,
408 KC(50), KS_asterisk, KS_mu,
409 KC(51), KS_m,
410 KC(52), KS_ugrave, KS_percent,
411 KC(53), KS_twosuperior,
412 KC(54), KS_semicolon, KS_period,
413 KC(55), KS_colon, KS_slash,
414 KC(56), KS_exclam, KS_section,
415 KC(100), KS_less, KS_greater,
416 KC(230), KS_Mode_switch, KS_Multi_key,
419 Static const keysym_t ukbd_keydesc_it[] = {
420 /* pos normal shifted altgr shift-altgr */
421 KC(31), KS_2, KS_quotedbl, KS_twosuperior,
422 KC(32), KS_3, KS_sterling, KS_threesuperior,
423 KC(33), KS_4, KS_dollar,
424 KC(34), KS_5, KS_percent,
425 KC(35), KS_6, KS_ampersand,
426 KC(36), KS_7, KS_slash,
427 KC(37), KS_8, KS_parenleft,
428 KC(38), KS_9, KS_parenright,
429 KC(39), KS_0, KS_equal,
430 KC(45), KS_apostrophe, KS_question,
431 KC(46), KS_igrave, KS_asciicircum,
432 KC(47), KS_egrave, KS_eacute, KS_braceleft, KS_bracketleft,
433 KC(48), KS_plus, KS_asterisk, KS_braceright, KS_bracketright,
434 KC(49), KS_ugrave, KS_section,
435 KC(51), KS_ograve, KS_Ccedilla, KS_at,
436 KC(52), KS_agrave, KS_degree, KS_numbersign,
437 KC(53), KS_backslash, KS_bar,
438 KC(54), KS_comma, KS_semicolon,
439 KC(55), KS_period, KS_colon,
440 KC(56), KS_minus, KS_underscore,
441 KC(100), KS_less, KS_greater,
442 KC(230), KS_Mode_switch, KS_Multi_key,
445 Static const keysym_t ukbd_keydesc_uk[] = {
446 /* pos normal shifted altgr shift-altgr */
447 KC(30), KS_1, KS_exclam, KS_plusminus, KS_exclamdown,
448 KC(31), KS_2, KS_quotedbl, KS_twosuperior, KS_cent,
449 KC(32), KS_3, KS_sterling, KS_threesuperior,
450 KC(33), KS_4, KS_dollar, KS_acute, KS_currency,
451 KC(34), KS_5, KS_percent, KS_mu, KS_yen,
452 KC(35), KS_6, KS_asciicircum, KS_paragraph,
453 KC(36), KS_7, KS_ampersand, KS_periodcentered, KS_brokenbar,
454 KC(37), KS_8, KS_asterisk, KS_cedilla, KS_ordfeminine,
455 KC(38), KS_9, KS_parenleft, KS_onesuperior, KS_diaeresis,
456 KC(39), KS_0, KS_parenright, KS_masculine, KS_copyright,
457 KC(45), KS_minus, KS_underscore, KS_hyphen, KS_ssharp,
458 KC(46), KS_equal, KS_plus, KS_onehalf, KS_guillemotleft,
459 KC(49), KS_numbersign, KS_asciitilde, KS_sterling, KS_thorn,
460 KC(50), KS_numbersign, KS_asciitilde,
461 KC(52), KS_apostrophe, KS_at, KS_section, KS_Agrave,
462 KC(53), KS_grave, KS_grave, KS_agrave, KS_agrave,
463 KC(100), KS_backslash, KS_bar, KS_Udiaeresis,
466 Static const keysym_t ukbd_keydesc_es[] = {
467 /* pos normal shifted altgr shift-altgr */
468 KC(30), KS_1, KS_exclam, KS_bar,
469 KC(31), KS_2, KS_quotedbl, KS_at,
470 KC(32), KS_3, KS_periodcentered, KS_numbersign,
471 KC(33), KS_4, KS_dollar, KS_asciitilde,
472 KC(35), KS_6, KS_ampersand,
473 KC(36), KS_7, KS_slash,
474 KC(37), KS_8, KS_parenleft,
475 KC(38), KS_9, KS_parenright,
476 KC(39), KS_0, KS_equal,
477 KC(45), KS_apostrophe, KS_question,
478 KC(46), KS_exclamdown, KS_questiondown,
479 KC(47), KS_dead_grave, KS_dead_circumflex, KS_bracketleft,
480 KC(48), KS_plus, KS_asterisk, KS_bracketright,
481 KC(49), KS_ccedilla, KS_Ccedilla, KS_braceright,
482 KC(50), KS_ccedilla, KS_Ccedilla, KS_braceright,
483 KC(51), KS_ntilde,
484 KC(52), KS_dead_acute, KS_dead_diaeresis, KS_braceleft,
485 KC(53), KS_degree, KS_ordfeminine, KS_backslash,
486 KC(54), KS_comma, KS_semicolon,
487 KC(55), KS_period, KS_colon,
488 KC(56), KS_minus, KS_underscore,
489 KC(100), KS_less, KS_greater,
490 KC(230), KS_Mode_switch, KS_Multi_key,
493 Static const keysym_t ukbd_keydesc_pt[] = {
494 /* pos normal shifted altgr shift-altgr */
495 KC(31), KS_2, KS_quotedbl, KS_at,
496 KC(32), KS_3, KS_numbersign, KS_sterling,
497 KC(35), KS_6, KS_ampersand,
498 KC(36), KS_7, KS_slash, KS_braceleft,
499 KC(37), KS_8, KS_parenleft, KS_bracketleft,
500 KC(38), KS_9, KS_parenright, KS_bracketright,
501 KC(39), KS_0, KS_equal, KS_braceright,
502 KC(45), KS_apostrophe, KS_question,
503 KC(46), KS_plus, KS_asterisk,
504 KC(47), KS_plus, KS_asterisk,
505 KC(48), KS_dead_acute, KS_dead_grave,
506 KC(49), KS_less, KS_greater,
507 KC(50), KS_dead_tilde, KS_dead_circumflex,
508 KC(51), KS_ccedilla, KS_Ccedilla,
509 KC(52), KS_masculine, KS_ordfeminine,
510 KC(53), KS_backslash, KS_bar,
511 KC(54), KS_comma, KS_semicolon,
512 KC(55), KS_period, KS_colon,
513 KC(56), KS_minus, KS_underscore,
514 KC(100), KS_less, KS_greater,
515 KC(226), KS_Mode_switch, KS_Multi_key,
516 KC(230), KS_Mode_switch, KS_Multi_key,
519 Static const keysym_t ukbd_keydesc_sg[] = {
520 /* pos normal shifted altgr shift-altgr */
521 KC(30), KS_1, KS_plus, KS_bar,
522 KC(31), KS_2, KS_quotedbl, KS_at,
523 KC(32), KS_3, KS_asterisk, KS_numbersign,
524 KC(33), KS_4, KS_ccedilla,
525 KC(35), KS_6, KS_ampersand, KS_notsign,
526 KC(36), KS_7, KS_slash, KS_brokenbar,
527 KC(37), KS_8, KS_parenleft, KS_cent,
528 KC(38), KS_9, KS_parenright,
529 KC(39), KS_0, KS_equal,
530 KC(45), KS_apostrophe, KS_question, KS_dead_acute,
531 KC(46), KS_dead_circumflex,KS_dead_grave, KS_dead_tilde,
532 KC(8), KS_e, KS_E, KS_currency,
533 KC(28), KS_z,
534 KC(47), KS_udiaeresis, KS_egrave, KS_bracketleft,
535 KC(48), KS_dead_diaeresis, KS_exclam, KS_bracketright,
536 KC(51), KS_odiaeresis, KS_eacute,
537 KC(52), KS_adiaeresis, KS_agrave, KS_braceleft,
538 KC(53), KS_section, KS_degree, KS_dead_abovering,
539 KC(50), KS_dollar, KS_sterling, KS_braceright,
540 KC(29), KS_y,
541 KC(54), KS_comma, KS_semicolon,
542 KC(55), KS_period, KS_colon,
543 KC(56), KS_minus, KS_underscore,
544 KC(100), KS_less, KS_greater, KS_backslash,
545 KC(230), KS_Mode_switch, KS_Multi_key,
548 Static const keysym_t ukbd_keydesc_sg_nodead[] = {
549 /* pos normal shifted altgr shift-altgr */
550 KC(45), KS_apostrophe, KS_question, KS_acute,
551 KC(46), KS_asciicircum, KS_grave, KS_asciitilde,
552 KC(48), KS_diaeresis, KS_exclam, KS_bracketright
555 Static const keysym_t ukbd_keydesc_sf[] = {
556 /* pos normal shifted altgr shift-altgr */
557 KC(47), KS_egrave, KS_udiaeresis, KS_bracketleft,
558 KC(51), KS_eacute, KS_odiaeresis,
559 KC(52), KS_agrave, KS_adiaeresis, KS_braceleft
562 #define KBD_MAP(name, base, map) \
563 { name, base, sizeof(map)/sizeof(keysym_t), map }
565 const struct wscons_keydesc ukbd_keydesctab[] = {
566 KBD_MAP(KB_US, 0, ukbd_keydesc_us),
567 KBD_MAP(KB_US | KB_SWAPCTRLCAPS,KB_US, ukbd_keydesc_swapctrlcaps),
568 KBD_MAP(KB_US | KB_DVORAK, KB_US, ukbd_keydesc_us_dvorak),
569 KBD_MAP(KB_US | KB_COLEMAK, KB_US, ukbd_keydesc_us_colemak),
570 KBD_MAP(KB_JP, KB_US, ukbd_keydesc_jp),
571 KBD_MAP(KB_JP | KB_SWAPCTRLCAPS,KB_JP, ukbd_keydesc_swapctrlcaps),
572 KBD_MAP(KB_DE, KB_US, ukbd_keydesc_de),
573 KBD_MAP(KB_DE | KB_NODEAD, KB_DE, ukbd_keydesc_de_nodead),
574 KBD_MAP(KB_FR, KB_US, ukbd_keydesc_fr),
575 KBD_MAP(KB_FR | KB_SWAPCTRLCAPS,KB_FR, ukbd_keydesc_swapctrlcaps),
576 KBD_MAP(KB_DK, KB_US, ukbd_keydesc_dk),
577 KBD_MAP(KB_DK | KB_NODEAD, KB_DK, ukbd_keydesc_dk_nodead),
578 KBD_MAP(KB_IT, KB_US, ukbd_keydesc_it),
579 KBD_MAP(KB_UK, KB_US, ukbd_keydesc_uk),
580 KBD_MAP(KB_SV, KB_DK, ukbd_keydesc_sv),
581 KBD_MAP(KB_SV | KB_NODEAD, KB_SV, ukbd_keydesc_sv_nodead),
582 KBD_MAP(KB_NO, KB_DK, ukbd_keydesc_no),
583 KBD_MAP(KB_NO | KB_NODEAD, KB_NO, ukbd_keydesc_no_nodead),
584 KBD_MAP(KB_ES , KB_US, ukbd_keydesc_es),
585 KBD_MAP(KB_PT, KB_US, ukbd_keydesc_pt),
586 KBD_MAP(KB_SG, KB_US, ukbd_keydesc_sg),
587 KBD_MAP(KB_SG | KB_NODEAD, KB_SG, ukbd_keydesc_sg_nodead),
588 KBD_MAP(KB_SF, KB_SG, ukbd_keydesc_sf),
589 KBD_MAP(KB_SF | KB_NODEAD, KB_SF, ukbd_keydesc_sg_nodead),
590 {0, 0, 0, 0}
593 #undef KBD_MAP
594 #undef KC