Home | History | Annotate | Line # | Download | only in dev
akbdmap.h revision 1.3.8.1
      1  1.3.8.1  nathanw /*	$NetBSD: akbdmap.h,v 1.3.8.1 2002/04/01 07:40:53 nathanw Exp $	*/
      2      1.1   tsubai 
      3      1.1   tsubai /*-
      4      1.1   tsubai  * Copyright (c) 1997 The NetBSD Foundation, Inc.
      5      1.1   tsubai  * All rights reserved.
      6      1.1   tsubai  *
      7      1.1   tsubai  * This code is derived from software contributed to The NetBSD Foundation
      8      1.1   tsubai  * by Juergen Hannken-Illjes.
      9      1.1   tsubai  *
     10      1.1   tsubai  * Redistribution and use in source and binary forms, with or without
     11      1.1   tsubai  * modification, are permitted provided that the following conditions
     12      1.1   tsubai  * are met:
     13      1.1   tsubai  * 1. Redistributions of source code must retain the above copyright
     14      1.1   tsubai  *    notice, this list of conditions and the following disclaimer.
     15      1.1   tsubai  * 2. Redistributions in binary form must reproduce the above copyright
     16      1.1   tsubai  *    notice, this list of conditions and the following disclaimer in the
     17      1.1   tsubai  *    documentation and/or other materials provided with the distribution.
     18      1.1   tsubai  * 3. All advertising materials mentioning features or use of this software
     19      1.1   tsubai  *    must display the following acknowledgement:
     20      1.1   tsubai  *	This product includes software developed by the NetBSD
     21      1.1   tsubai  *	Foundation, Inc. and its contributors.
     22      1.1   tsubai  * 4. Neither the name of The NetBSD Foundation nor the names of its
     23      1.1   tsubai  *    contributors may be used to endorse or promote products derived
     24      1.1   tsubai  *    from this software without specific prior written permission.
     25      1.1   tsubai  *
     26      1.1   tsubai  * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
     27      1.1   tsubai  * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
     28      1.1   tsubai  * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
     29      1.1   tsubai  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
     30      1.1   tsubai  * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
     31      1.1   tsubai  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
     32      1.1   tsubai  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
     33      1.1   tsubai  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
     34      1.1   tsubai  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
     35      1.1   tsubai  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
     36      1.1   tsubai  * POSSIBILITY OF SUCH DAMAGE.
     37      1.1   tsubai  */
     38      1.1   tsubai 
     39      1.1   tsubai /* XXX This list is incomplete. */
     40      1.1   tsubai 
     41      1.2   tsubai #define KC(n) KS_KEYCODE(n)
     42      1.1   tsubai 
     43      1.1   tsubai static const keysym_t akbd_keydesc_us[] = {
     44      1.1   tsubai /*  pos      command		normal		shifted */
     45      1.1   tsubai     KC(0),			KS_a,
     46      1.1   tsubai     KC(1),			KS_s,
     47      1.1   tsubai     KC(2),			KS_d,
     48      1.1   tsubai     KC(3),			KS_f,
     49      1.1   tsubai     KC(4),			KS_h,
     50      1.1   tsubai     KC(5),			KS_g,
     51      1.1   tsubai     KC(6),			KS_z,
     52      1.1   tsubai     KC(7),			KS_x,
     53      1.1   tsubai     KC(8),			KS_c,
     54      1.1   tsubai     KC(9),			KS_v,
     55      1.1   tsubai 
     56      1.1   tsubai     KC(11),			KS_b,
     57      1.1   tsubai     KC(12),			KS_q,
     58      1.1   tsubai     KC(13),			KS_w,
     59      1.1   tsubai     KC(14),			KS_e,
     60      1.1   tsubai     KC(15),			KS_r,
     61      1.1   tsubai     KC(16),			KS_y,
     62      1.1   tsubai     KC(17),			KS_t,
     63      1.1   tsubai     KC(18),			KS_1,		KS_exclam,
     64      1.1   tsubai     KC(19),			KS_2,		KS_at,
     65      1.1   tsubai     KC(20),			KS_3,		KS_numbersign,
     66      1.1   tsubai     KC(21),			KS_4,		KS_dollar,
     67      1.1   tsubai     KC(22),			KS_6,		KS_asciicircum,
     68      1.1   tsubai     KC(23),			KS_5,		KS_percent,
     69      1.1   tsubai     KC(24),			KS_equal,	KS_plus,
     70      1.1   tsubai     KC(25),			KS_9,		KS_parenleft,
     71      1.1   tsubai     KC(26),			KS_7,		KS_ampersand,
     72      1.1   tsubai     KC(27),			KS_minus,	KS_underscore,
     73      1.1   tsubai     KC(28),			KS_8,		KS_asterisk,
     74      1.1   tsubai     KC(29),			KS_0,		KS_parenright,
     75      1.1   tsubai     KC(30),			KS_bracketright, KS_braceright,
     76      1.1   tsubai     KC(31),			KS_o,
     77      1.1   tsubai     KC(32),			KS_u,
     78      1.1   tsubai     KC(33),			KS_bracketleft,	KS_braceleft,
     79      1.1   tsubai     KC(34),			KS_i,
     80      1.1   tsubai     KC(35),			KS_p,
     81      1.1   tsubai     KC(36),			KS_Return,
     82      1.1   tsubai     KC(37),			KS_l,
     83      1.1   tsubai     KC(38),			KS_j,
     84      1.1   tsubai     KC(39),			KS_apostrophe,	KS_quotedbl,
     85      1.1   tsubai     KC(40),			KS_k,
     86      1.1   tsubai     KC(41),			KS_semicolon,	KS_colon,
     87      1.1   tsubai     KC(42),			KS_backslash,	KS_bar,
     88      1.1   tsubai     KC(43),			KS_comma,	KS_less,
     89      1.1   tsubai     KC(44),			KS_slash,	KS_question,
     90      1.1   tsubai     KC(45),			KS_n,
     91      1.1   tsubai     KC(46),			KS_m,
     92      1.1   tsubai     KC(47),			KS_period,	KS_greater,
     93      1.1   tsubai     KC(48),			KS_Tab,
     94      1.1   tsubai     KC(49),			KS_space,
     95      1.1   tsubai     KC(50),			KS_grave,	KS_asciitilde,
     96      1.1   tsubai     KC(51),			KS_Delete,
     97  1.3.8.1  nathanw     KC(52),			KS_KP_Enter,    /* Maybe we should pretend this is alt-R */
     98      1.1   tsubai     KC(53),			KS_Escape,
     99      1.1   tsubai     KC(54),			KS_Control_L,
    100      1.1   tsubai     KC(55),  KS_Cmd,				/* Command */
    101      1.1   tsubai     KC(56),			KS_Shift_L,
    102      1.1   tsubai     KC(57),			KS_Caps_Lock,
    103      1.1   tsubai     KC(58),  KS_Cmd1,				/* Option */
    104      1.1   tsubai     KC(59),			KS_Left,
    105      1.1   tsubai     KC(60),			KS_Right,
    106      1.1   tsubai     KC(61),			KS_Down,
    107      1.1   tsubai     KC(62),			KS_Up,
    108      1.1   tsubai 
    109      1.1   tsubai     KC(65),			KS_KP_Decimal,
    110      1.1   tsubai     KC(67),			KS_KP_Multiply,
    111      1.1   tsubai     KC(69),			KS_KP_Add,
    112      1.1   tsubai     KC(71),			KS_Clear,
    113      1.1   tsubai     KC(75),			KS_KP_Divide,
    114      1.1   tsubai     KC(76),			KS_KP_Enter,
    115      1.1   tsubai     KC(78),			KS_KP_Subtract,
    116      1.1   tsubai 
    117      1.1   tsubai     KC(81),			KS_KP_Equal,
    118      1.1   tsubai     KC(82),			KS_KP_0,
    119      1.1   tsubai     KC(83),			KS_KP_1,
    120      1.1   tsubai     KC(84),			KS_KP_2,
    121      1.1   tsubai     KC(85),			KS_KP_3,
    122      1.1   tsubai     KC(86),			KS_KP_4,
    123      1.1   tsubai     KC(87),			KS_KP_5,
    124      1.1   tsubai     KC(88),			KS_KP_6,
    125      1.1   tsubai     KC(89),			KS_KP_7,
    126      1.1   tsubai 
    127      1.1   tsubai     KC(91),			KS_KP_8,
    128      1.1   tsubai     KC(92),			KS_KP_9,
    129      1.1   tsubai 
    130      1.1   tsubai     KC(95),			KS_comma,	/* XXX KS_KP_comma */
    131  1.3.8.1  nathanw     KC(96),			KS_f5,
    132  1.3.8.1  nathanw     KC(97),			KS_f6,
    133  1.3.8.1  nathanw     KC(98),			KS_f7,
    134  1.3.8.1  nathanw     KC(99),			KS_f3,
    135  1.3.8.1  nathanw     KC(100),			KS_f8,
    136  1.3.8.1  nathanw 
    137  1.3.8.1  nathanw     KC(101),			KS_f9,
    138  1.3.8.1  nathanw 
    139  1.3.8.1  nathanw     KC(103),			KS_f11,
    140      1.1   tsubai 
    141      1.1   tsubai     KC(106),			KS_KP_Enter,
    142  1.3.8.1  nathanw 
    143  1.3.8.1  nathanw     KC(109),			KS_f10,
    144  1.3.8.1  nathanw 
    145  1.3.8.1  nathanw     KC(111),			KS_f12,
    146  1.3.8.1  nathanw 
    147  1.3.8.1  nathanw     KC(115),			KS_Home,
    148  1.3.8.1  nathanw     KC(116),			KS_Prior,
    149  1.3.8.1  nathanw 
    150  1.3.8.1  nathanw     KC(118),			KS_f4,
    151  1.3.8.1  nathanw     KC(119),			KS_End,
    152  1.3.8.1  nathanw     KC(120),			KS_f2,
    153  1.3.8.1  nathanw     KC(121),			KS_Next,
    154  1.3.8.1  nathanw     KC(122),			KS_f1,
    155      1.1   tsubai 
    156      1.1   tsubai     KC(127),  KS_Cmd_Debugger,
    157      1.1   tsubai };
    158      1.1   tsubai 
    159      1.3   tsubai static const keysym_t akbd_keydesc_fr[] = {
    160      1.3   tsubai /*  pos		normal		shifted		altgr		shift-altgr */
    161      1.3   tsubai     KC(0),	KS_q,
    162      1.3   tsubai     KC(6),	KS_w,
    163      1.3   tsubai     KC(10),	KS_at,		KS_numbersign,
    164      1.3   tsubai     KC(12),	KS_a,
    165      1.3   tsubai     KC(13),	KS_z,
    166      1.3   tsubai     KC(18),	KS_ampersand,	KS_1,
    167      1.3   tsubai     KC(19),	KS_eacute,	KS_2,		KS_asciitilde,
    168      1.3   tsubai     KC(20),	KS_quotedbl,	KS_3,		KS_numbersign,
    169      1.3   tsubai     KC(21),	KS_apostrophe,	KS_4,		KS_braceleft,
    170      1.3   tsubai     KC(22),	KS_section,	KS_6,		KS_bar,
    171      1.3   tsubai     KC(23),	KS_parenleft,	KS_5,		KS_bracketleft,	KS_braceleft,
    172      1.3   tsubai     KC(24),	KS_minus,	KS_underscore,	KS_braceright,
    173      1.3   tsubai     KC(25),	KS_ccedilla,	KS_9,		KS_asciicircum,
    174      1.3   tsubai     KC(26),	KS_egrave,	KS_7,		KS_grave,
    175      1.3   tsubai     KC(27),	KS_parenright,	KS_degree,	KS_bracketright, KS_braceright,
    176      1.3   tsubai     KC(28),	KS_exclam,	KS_8,		KS_bar,
    177      1.3   tsubai     KC(29),	KS_agrave,	KS_0,		KS_at,
    178      1.3   tsubai     KC(30),	KS_dollar,	KS_asterisk,
    179      1.3   tsubai     KC(33),	KS_dead_circumflex, KS_dead_diaeresis,
    180      1.3   tsubai     KC(39),	KS_mu,		KS_percent,
    181      1.3   tsubai     KC(40),	KS_k,
    182      1.3   tsubai     KC(41),	KS_m,
    183      1.3   tsubai     KC(42),	KS_grave,	KS_sterling,
    184      1.3   tsubai     KC(43),	KS_semicolon,	KS_period,
    185      1.3   tsubai     KC(44),	KS_equal,	KS_plus,
    186      1.3   tsubai     KC(46),	KS_comma,	KS_question,
    187      1.3   tsubai     KC(47),	KS_colon,	KS_slash,	KS_backslash,
    188      1.3   tsubai     KC(50),	KS_less,	KS_greater,
    189      1.3   tsubai     KC(52),	KS_Alt_R,
    190      1.3   tsubai     KC(55),	KS_Meta_L,				/* Command */
    191      1.3   tsubai     KC(58),	KS_Alt_R,				/* Option */
    192      1.3   tsubai };
    193      1.3   tsubai 
    194      1.1   tsubai #if 0
    195      1.1   tsubai static const keysym_t akbd_keydesc_jp[] = {
    196      1.1   tsubai /*  pos      command		normal		shifted */
    197      1.1   tsubai     KC(42),			KS_grave,	KS_asciitilde,
    198      1.1   tsubai     KC(93),			KS_backslash,	KS_bar,
    199      1.1   tsubai };
    200      1.1   tsubai #endif
    201      1.1   tsubai 
    202      1.1   tsubai #define KBD_MAP(name, base, map) \
    203      1.1   tsubai 			{ name, base, sizeof(map)/sizeof(keysym_t), map }
    204      1.1   tsubai 
    205      1.1   tsubai static const struct wscons_keydesc akbd_keydesctab[] = {
    206      1.1   tsubai 	KBD_MAP(KB_US,			0,	akbd_keydesc_us),
    207      1.3   tsubai 	KBD_MAP(KB_FR,			KB_US,	akbd_keydesc_fr),
    208      1.2   tsubai 	{0, 0, 0, 0}
    209      1.1   tsubai };
    210      1.1   tsubai 
    211      1.1   tsubai #undef KBD_MAP
    212      1.1   tsubai #undef KC
    213