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