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