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