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