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