Home | History | Annotate | Line # | Download | only in hpc
hpckbdkeymap.h revision 1.3
      1 /*	$NetBSD: hpckbdkeymap.h,v 1.3 2001/03/02 19:19:34 uch Exp $ */
      2 
      3 /*-
      4  * Copyright (c) 1999-2001 The NetBSD Foundation, Inc.
      5  * All rights reserved.
      6  *
      7  * Redistribution and use in source and binary forms, with or without
      8  * modification, are permitted provided that the following conditions
      9  * are met:
     10  * 1. Redistributions of source code must retain the above copyright
     11  *    notice, this list of conditions and the following disclaimer.
     12  * 2. Redistributions in binary form must reproduce the above copyright
     13  *    notice, this list of conditions and the following disclaimer in the
     14  *    documentation and/or other materials provided with the distribution.
     15  * 3. All advertising materials mentioning features or use of this software
     16  *    must display the following acknowledgement:
     17  *        This product includes software developed by the NetBSD
     18  *        Foundation, Inc. and its contributors.
     19  * 4. Neither the name of The NetBSD Foundation nor the names of its
     20  *    contributors may be used to endorse or promote products derived
     21  *    from this software without specific prior written permission.
     22  *
     23  * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
     24  * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
     25  * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
     26  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
     27  * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
     28  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
     29  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
     30  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
     31  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
     32  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
     33  * POSSIBILITY OF SUCH DAMAGE.
     34  */
     35 
     36 #define UNK		255	/* unknown */
     37 #define IGN		254	/* ignore */
     38 #define SPL		253	/* special key */
     39 #define KC(n)		KS_KEYCODE(n)
     40 #define CMDMAP(map)	{ map, (sizeof(map)/sizeof(keysym_t)) }
     41 #define NULLCMDMAP	{ NULL, 0 }
     42 
     43 #define KEY_SPECIAL_OFF		0
     44 #define KEY_SPECIAL_LIGHT	1
     45 
     46 const u_int8_t default_keymap[] = {
     47 /*      0    1    2    3    4    5    6    7 */
     48 /* 0 */	UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK,
     49 /* 1 */	UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK,
     50 /* 2 */	UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK,
     51 /* 3 */	UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK,
     52 /* 4 */	UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK,
     53 /* 5 */	UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK,
     54 /* 6 */	UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK,
     55 /* 7 */	UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK,
     56 /* 8 */	UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK,
     57 /* 9 */	UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK,
     58 /*10 */	UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK,
     59 /*11 */	UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK,
     60 /*12 */	UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK,
     61 /*13 */	UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK,
     62 /*14 */	UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK,
     63 /*15 */	UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK
     64 };
     65 
     66 const int default_special_keymap[] = {
     67 	[KEY_SPECIAL_OFF]	= -1,
     68 	[KEY_SPECIAL_LIGHT]	= -1
     69 };
     70 
     71 #ifdef hpcmips
     72 const u_int8_t tc5165_mobilon_keymap[] = {
     73 /*      0    1    2    3    4    5    6    7 */
     74 /* 0 */	37 , 45 , 44 , UNK, 9  , 51 , 23 , UNK,
     75 /* 1 */	UNK, 56 , UNK, UNK, UNK, UNK, UNK, UNK,
     76 /* 2 */	UNK, UNK, 29 , UNK, UNK, UNK, UNK, UNK,
     77 /* 3 */	24 , 203, UNK, 38 , 10 , 27 , 13 , UNK,
     78 /* 4 */	40 , UNK, UNK, 39 , 26 , 53 , 11 , 12 ,
     79 /* 5 */	UNK, UNK, UNK, 53 , 25 , UNK, UNK, SPL, /* Light */
     80 /* 6 */	208, UNK, UNK, UNK, 52 , UNK, 43 , 14 ,
     81 /* 7 */	205, 200, UNK, UNK, SPL, UNK, UNK, 28 , /* Off key */
     82 /* 8 */	UNK, 41 , 59 , 15 , 2  , UNK, UNK, UNK,
     83 /* 9 */	63 , 64 , 1  , UNK, 65 , 16 , 17 , UNK,
     84 /*10 */	60 , UNK, 61 , 62 , 3  , UNK, UNK, UNK,
     85 /*11 */	UNK, UNK, UNK, 42 , 58 , UNK, UNK, UNK,
     86 /*12 */	47 , 33 , 46 , 5  , 4  , 18 , 19 , UNK,
     87 /*13 */	34 , 35 , 20 , 48 , 6  , 7  , 21 , 49 ,
     88 /*14 */	22 , 31 , 32 , 36 , 8  , 30 , 50 , 57 ,
     89 /*15 */	UNK, IGN, UNK, UNK, UNK, UNK, UNK, UNK /* Windows key */
     90 };
     91 
     92 const int tc5165_mobilon_special_keymap[] = {
     93 	[KEY_SPECIAL_OFF]	= 60,
     94 	[KEY_SPECIAL_LIGHT]	= 47
     95 };
     96 
     97 const u_int8_t tc5165_telios_jp_keymap[] = {
     98 /*      0    1    2    3    4    5    6    7 */
     99 /* 0 */	58,  15,  IGN, 1,   IGN, IGN, IGN, IGN,
    100 /* 1 */	IGN, IGN, IGN, IGN, 54,  42,  IGN, IGN,
    101 /* 2 */	31,  18,  4,   IGN, IGN, 32,  45,  59,
    102 /* 3 */	33,  19,  5,   61,  IGN, 46,  123, 60,
    103 /* 4 */	35,  21,  8,   64,  IGN, 48,  49,  63,
    104 /* 5 */	17,  16,  3,   IGN, 2,   30,  44,  41,
    105 /* 6 */	IGN, IGN, IGN, IGN, IGN, IGN, IGN, IGN,
    106 /* 7 */	IGN, IGN, IGN, IGN, IGN, IGN, 56,  IGN,
    107 /* 8 */	34,  20,  7,   IGN, 6,   47,  57,  62,
    108 /* 9 */	IGN, IGN, IGN, IGN, IGN, IGN, 29,  IGN,
    109 /*10 */	27,  125, 13,  75,  80,  40,  115, 68,
    110 /*11 */	39,  26,  25,  IGN, 12,  52,  53,  67,
    111 /*12 */	37,  24,  11,  IGN, 10,  38,  51,  66,
    112 /*13 */	23,  22,  9,   IGN, IGN, 36,  50,  65,
    113 /*14 */	28,  43,  14,  72,  77,  IGN, IGN, 211,
    114 /*15 */	IGN, IGN, IGN, IGN, IGN, IGN, 221, IGN
    115 };
    116 
    117 const u_int8_t tc5165_compaq_c_jp_keymap[] = {
    118 /*      0    1    2    3    4    5    6    7 */
    119 /* 0 */	38,  50,  49,  48,  47,  46,  45,  44,
    120 /* 1 */	56,  IGN, IGN, IGN, IGN, IGN, IGN, IGN,
    121 /* 2 */	13,  IGN, 112, 121, 123, 41,  28,  57,
    122 /* 3 */	77,  75,  80,  72,  39,  53,  52,  51,
    123 /* 4 */	24,  25,  40,  IGN, 43,  26,  115, 58,
    124 /* 5 */	54,  IGN, IGN, IGN, IGN, IGN, IGN, IGN,
    125 /* 6 */	IGN, IGN, IGN, SPL, IGN, IGN, IGN, IGN, /* Light */
    126 /* 7 */	IGN, IGN, IGN, IGN, IGN, IGN, IGN, IGN,
    127 /* 8 */	42,  IGN, IGN, IGN, IGN, IGN, IGN, IGN,
    128 /* 9 */	29,  IGN, IGN, IGN, IGN, IGN, IGN, IGN,
    129 /*10 */	221, IGN, IGN, IGN, IGN, IGN, IGN, IGN,
    130 /*11 */	221, IGN, IGN, IGN, IGN, IGN, IGN, IGN,
    131 /*12 */	14,  27,  12,  11,  10,  15,  1,   125,
    132 /*13 */	9,   8,   7,   6,   5,   4,   3,   2,
    133 /*14 */	23,  22,  21,  20,  19,  18,  17,  16,
    134 /*15 */	37,  36,  35,  34,  33,  32,  31,  30
    135 };
    136 
    137 const int tc5165_compaq_c_jp_special_keymap[] = {
    138 	[KEY_SPECIAL_OFF]	= -1, /* don't have off button */
    139 	[KEY_SPECIAL_LIGHT]	= 51
    140 };
    141 
    142 const u_int8_t m38813c_keymap[] = {
    143 /*      0    1    2    3    4    5    6    7 */
    144 /* 0 */	0,   1,   2,   3,   4,   5,   6,   7,
    145 /* 1 */	8,   9,   10,  11,  12,  13,  14,  15,
    146 /* 2 */	16,  17,  18,  19,  20,  21,  22,  23,
    147 /* 3 */	24,  25,  26,  27,  28,  29,  30,  31,
    148 /* 4 */	32,  33,  34,  35,  36,  37,  38,  39,
    149 /* 5 */	40,  41,  42,  43,  44,  45,  46,  47,
    150 /* 6 */	48,  49,  50,  51,  52,  53,  54,  55,
    151 /* 7 */	56,  57,  58,  59,  60,  61,  62,  63,
    152 /* 8 */	64,  65,  66,  67,  68,  69,  70,  71,
    153 /* 9 */	72,  73,  74,  75,  76,  77,  78,  79,
    154 /*10 */	80,  81,  82,  83,  84,  85,  86,  87,
    155 /*11 */	88,  89,  90,  91,  92,  93,  94,  95,
    156 /*12 */	96,  97,  98,  99,  100, 101, 102, 103,
    157 /*13 */	104, 105, 106, 107, 108, 109, 110, 111,
    158 /*14 */	112, 113, 114, 115, 116, 117, 118, 119,
    159 /*15 */	120, 121, 122, 123, 124, 125, 126, 127
    160 };
    161 
    162 /* NEC MobileGearII MCR series (Japan) */
    163 static u_int8_t mcr_jp_keytrans[] = {
    164 /*00	right	ent	p	.	y	b	z	space	*/
    165 /*08	down	/	o	,	t	v	a	nfer	*/
    166 /*10	left	\	i	m	r	c	w	menu	*/
    167 /*18	^	-	u	-	e	x	q	1	*/
    168 /*20	pgdn	h/z	0	l	:	g	tab	f1	*/
    169 /*28	xfer	;	9	n	5	f	2	k	*/
    170 /*30	up	[	8	j	4	d	6	-	*/
    171 /*38	-	@	7	h	3	]	s	-	*/
    172 /*40	caps	-	-	-	bs	fnc	f8	f3	*/
    173 /*48	-	alt	-	-	|	k/h	f7	f4	*/
    174 /*50	-	-	ctrl	-	f10	pgup	f6	f2	*/
    175 /*58	-	-	-	shift	del	f9	f5	esc	*/
    176 /*----------------------------------------------------------------------*/
    177 /*00*/	 77,	 28,	 25,	 52,	 21,	 48,	 44,	 57,
    178 /*08*/	 80,	 53,	 24,	 51,	 20,	 47,	 30,	123,
    179 /*10*/	 75,	115,	 23,	 50,	 19,	 46,	 17,	221,
    180 /*18*/	 13,	IGN,	 22,	IGN,	 18,	 45,	 16,	  2,
    181 /*20*/	 81,	 41,	 11,	 38,	 40,	 34,	 15,	 59,
    182 /*28*/	121,	 39,	 10,	 49,	  6,	 33,	  3,	 37,
    183 /*30*/	 72,	 27,	  9,	 36,	  5,	 32,	  7,	IGN,
    184 /*38*/	 12,	 26,	  8,	 35,	  4,	 43,	 31,	IGN,
    185 /*40*/	 58,	IGN,	IGN,	IGN,	 14,	184,	 66,	 61,
    186 /*48*/	IGN,	 56,	IGN,	IGN,	125,	112,	 65,	 62,
    187 /*50*/	IGN,	IGN,	 29,	IGN,	 68,	 73,	 64,	 60,
    188 /*58*/	IGN,	IGN,	IGN,	 42,	 14,	 67,	 63,	  1,
    189 };
    190 
    191 static const keysym_t mcr_jp_cmdmap[] = {
    192 /*	pos      command		normal		shifted		*/
    193 	KC(184), KS_Cmd,		KS_Alt_R,	KS_Multi_key,
    194 	KC(73),  KS_Cmd_BrightnessUp,	KS_KP_Prior,	KS_KP_9,
    195 	KC(81),  KS_Cmd_BrightnessDown,	KS_KP_Next,	KS_KP_3,
    196 	KC(51),  KS_Cmd_ContrastDown,	KS_comma,	KS_less,
    197 	KC(52),  KS_Cmd_ContrastUp,	KS_period,	KS_greater,
    198 	KC(57),  KS_Cmd_BacklightToggle,KS_space,
    199 };
    200 
    201 /* IBM WorkPad z50 */
    202 static u_int8_t z50_keytrans[] = {
    203 /*00	f1	f3	f5	f7	f9	-	-	f11	*/
    204 /*08	f2	f4	f6	f8	f10	-	-	f12	*/
    205 /*10	'	[	-	0	p	;	up	/	*/
    206 /*18	-	-	-	9	o	l	.	-	*/
    207 /*20	left	]	=	8	i	k	,	-	*/
    208 /*28	h	y	6	7	u	j	m	n	*/
    209 /*30	-	bs	num	del	-	\	ent	sp	*/
    210 /*38	g	t	5	4	r	f	v	b	*/
    211 /*40	-	-	-	3	e	d	c	right	*/
    212 /*48	-	-	-	2	w	s	x	down	*/
    213 /*50	esc	tab	~	1	q	a	z	-	*/
    214 /*58	menu	Ls	Lc	Rc	La	Ra	Rs	-	*/
    215 /*----------------------------------------------------------------------*/
    216 /*00*/	 59,	 61,	 63,	 65,	 67,	IGN,	IGN,	 87,
    217 /*08*/	 60,	 62,	 64,	 66,	 68,	IGN,	IGN,	 88,
    218 /*10*/	 40,	 26,	 12,	 11,	 25,	 39,	 72,	 53,
    219 /*18*/	IGN,	IGN,	IGN,	 10,	 24,	 38,	 52,	IGN,
    220 /*20*/	 75,	 27,	 13,	  9,	 23,	 37,	 51,	IGN,
    221 /*28*/	 35,	 21,	  7,	  8,	 22,	 36,	 50,	 49,
    222 /*30*/	IGN,	 14,	 69,	 14,	IGN,	 43,	 28,	 57,
    223 /*38*/	 34,	 20,	  6,	  5,	 19,	 33,	 47,	 48,
    224 /*40*/	IGN,	IGN,	IGN,	  4,	 18,	 32,	 46,	 77,
    225 /*48*/	IGN,	IGN,	IGN,	  3,	 17,	 31,	 45,	 80,
    226 /*50*/	  1,	 15,	 41,	  2,	 16,	 30,	 44,	IGN,
    227 /*58*/	221,	 42,	 29,	 29,	 56,	 56,	 54,	IGN,
    228 };
    229 
    230 /* Sharp Tripad PV6000 and VADEM CLIO */
    231 static u_int8_t tripad_keytrans[] = {
    232 /*00	lsh	tab	`	q	esc	1	WIN	-	*/
    233 /*08	ctrl	z	x	a	s	w	e	2	*/
    234 /*10	lalt	sp	c	v	d	f	r	3	*/
    235 /*18	b	n	g	h	t	y	4	5	*/
    236 /*20	m	,	j	k	u	i	6	7	*/
    237 /*28	Fn	caps	l	o	p	8	9	0	*/
    238 /*30	[	]	la	.	/	;	-	=	*/
    239 /*38	rsh	ra	ua	da	'	ent	\	del	*/
    240 /*40	-	-	-	-	-	-	-	-	*/
    241 /*48	-	-	-	-	-	-	-	-	*/
    242 /*50	-	-	-	-	-	-	-	-	*/
    243 /*58	-	-	-	-	-	-	-	-	*/
    244 /*----------------------------------------------------------------------*/
    245 /*00*/	 42,	 15,	 41,	 16,	  1,	  2,	104,	221,
    246 /*08*/	 29,	 44,	 45,	 30,	 31,	 17,	 18,	  3,
    247 /*10*/	 56,	 57,	 46,	 47,	 32,	 33,	 19,	  4,
    248 /*18*/	 48,	 49,	 34,	 35,	 20,	 21,	  5,	  6,
    249 /*20*/	 50,	 51,	 36,	 37,	 22,	 23,	  7,	  8,
    250 /*28*/	105,	 58,	 38,	 24,	 25,	  9,	 10,	 11,
    251 /*30*/	 26,	 27,	 75,	 52,	 53,	 39,	 12,	 13,
    252 /*38*/	 54,	 77,	 72,	 80,	 40,	 28,	 43,	 14,
    253 /*40*/	IGN,	IGN,	IGN,	IGN,	IGN,	IGN,	IGN,	IGN,
    254 /*48*/	IGN,	IGN,	IGN,	IGN,	IGN,	IGN,	IGN,	IGN,
    255 /*50*/	IGN,	IGN,	IGN,	IGN,	IGN,	IGN,	IGN,	IGN,
    256 /*58*/	IGN,	IGN,	IGN,	IGN,	IGN,	IGN,	IGN,	IGN,
    257 };
    258 
    259 /* NEC Mobile Gear MCCS series */
    260 static u_int8_t mccs_keytrans[] = {
    261 /*00	caps	cr	rar	p	.	y	b	z	*/
    262 /*08	alt	[	dar	o	,	t	v	a	*/
    263 /*10	zen	@	lar	i	m	r	c	w	*/
    264 /*18	lctrl	;	uar	u	n	e	x	q	*/
    265 /*20	lshft	bs	\	0	l	6	g	tab	*/
    266 /*28	nconv	|	/	9	k	5	f	2	*/
    267 /*30	conv	=	]	8	j	4	d	1	*/
    268 /*38	hira	-	'	7	h	3	s	esc	*/
    269 /*40	-	sp	-	-	-	-	-	-	*/
    270 /*48	-	-	-	-	-	-	-	-	*/
    271 /*50	-	-	-	-	-	-	-	-	*/
    272 /*58	-	-	-	-	-	-	-	-	*/
    273 /*----------------------------------------------------------------------*/
    274 /*00*/	 58,	 28,	 77,	 25,	 52,	 21,	 48,	 44,
    275 /*08*/	 56,	 27,	 80,	 24,	 51,	 20,	 47,	 30,
    276 /*10*/	 41,	 26,	 75,	 23,	 50,	 19,	 46,	 17,
    277 /*18*/	 29,	 39,	 72,	 22,	 49,	 18,	 45,	 16,
    278 /*20*/	 42,	 14,	115,	 11,	 38,	  7,	 34,	 15,
    279 /*28*/	123,	125,	 53,	 10,	 37,	  6,	 33,	  3,
    280 /*30*/	121,	 13,	 43,	  9,	 36,	  5,	 32,	  2,
    281 /*38*/	112,	 12,	 40,	  8,	 35,	  4,	 31,	  1,
    282 /*40*/	IGN,	 57,	IGN,	IGN,	IGN,	IGN,	IGN,	IGN,
    283 /*48*/	IGN,	IGN,	IGN,	IGN,	IGN,	IGN,	IGN,	IGN,
    284 /*50*/	IGN,	IGN,	IGN,	IGN,	IGN,	IGN,	IGN,	IGN,
    285 /*58*/	IGN,	IGN,	IGN,	IGN,	IGN,	IGN,	IGN,	IGN,
    286 };
    287 
    288 static const keysym_t mccs_cmdmap[] = {
    289 /*	pos      command		normal		shifted		*/
    290 	KC(51),  KS_Cmd_ContrastDown,	KS_comma,	KS_less,
    291 	KC(52),  KS_Cmd_ContrastUp,	KS_period,	KS_greater,
    292 	KC(57),  KS_Cmd_BacklightToggle,KS_space,
    293 };
    294 
    295 static u_int8_t mobilepro_keytrans[] = {
    296 /*00	space	]	\	/	-	-	enter	l	*/
    297 /*08	-	[	'	;	-	-	.	o	*/
    298 /*10	-	-	-	Windows	v	c	x	z	*/
    299 /*18	-	=	\-	`	f	d	s	a	*/
    300 /*20	8	7	6	5	r	e	w	q	*/
    301 /*28	,	m	n	b	-	-	0	9	*/
    302 /*30	k	j	h	g	4	3	2	1	*/
    303 /*38	i	u	y	t	-	caps	del	esc	*/
    304 /*40	alt_R	-	-	-	BS	p	TAB	Fn	*/
    305 /*48	-	alt_L	-	-	f12	f11	f10	f9	*/
    306 /*50	-	-	ctrl	-	f8	f7	f6	f5	*/
    307 /*58	-	-	-	shift	f4	f3	f2	f1	*/
    308 /*----------------------------------------------------------------------*/
    309 /*00*/	 57,	 27,	 43,	 53,	 75,	 80,	 28,	 38,
    310 /*08*/	IGN,	 26,	 40,	 39,	 77,	 72,	 52,	 24,
    311 /*10*/	IGN,	IGN,	IGN,	221,	 47,	 46,	 45,	 44,
    312 /*18*/	IGN,	 13,	 12,	 41,	 33,	 32,	 31,	 30,
    313 /*20*/	  9,	  8,	  7,	  6,	 19,	 18,	 17,	 16,
    314 /*28*/	 51,	 50,	 49,	 48,	IGN,	IGN,	 11,	 10,
    315 /*30*/	 37,	 36,	 35,	 34,	  5,	  4,	  3,	  2,
    316 /*38*/	 23,	 22,	 21,	 20,	IGN,	 58,	 14,	  1,
    317 /*40*/	184,	IGN,	IGN,	IGN,	 14,	 25,	 15,	IGN,
    318 /*48*/	IGN,	 56,	IGN,	IGN,	 88,	 87,	 68,	 67,
    319 /*50*/	IGN,	IGN,	 29,	IGN,	 66,	 65,	 64,	 63,
    320 /*58*/	IGN,	IGN,	IGN,	 42,	 62,	 61,	 60,	 59,
    321 };
    322 
    323 /* NEC MobilePro 750c by "Castor Fu" <castor (at) geocast.com> */
    324 static u_int8_t mobilepro750c_keytrans[] = {
    325 /*00	right	\	p	.	y	b	z	space	*/
    326 /*08	down	/	o	,	t	v	a	-	*/
    327 /*10	left	enter	i	m	r	c	w	Win	*/
    328 /*18	num	]	u	n	e	x	q	caps	*/
    329 /*20	pgdn	-	0	l	:	g	tab	esc	*/
    330 /*28	-	;	9	k	5	f	2	`	*/
    331 /*30	up	[	8	j	4	d	1	'	*/
    332 /*38	-	@	7	h	3	s	del	-	*/
    333 /*40	shift	-	-	-	bs	f12	f8	f4	*/
    334 /*48	-	alt	-	-	|	f11	f7	f3	*/
    335 /*50	-	-	ctrl	-	f10	f10	f6	f2	*/
    336 /*58	-	-	-	shift	del	f9	f5	f1	*/
    337 /*----------------------------------------------------------------------*/
    338 /*00*/	77,	43,	25,	52,	21,	48,	44,	57,
    339 /*08*/	80,	53,	24,	51,	20,	47,	30,	IGN,
    340 /*10*/	75,	28,	23,	50,	19,	46,	17,	221,
    341 /*18*/	69,	27,	22,	49,	18,	45,	16,	58,
    342 /*20*/	81,	IGN,	11,	38,	7,	34,	15,	1,
    343 /*28*/	IGN,	39,	10,	37,	6,	33,	3,	41,
    344 /*30*/	72,	26,	9,	36,	5,	32,	2,	40,
    345 /*38*/	12,	26,	8,	35,	4,	31,	83,	IGN,
    346 /*40*/	42,	IGN,	IGN,	IGN,	14,	88,	66,	62,
    347 /*48*/	IGN,	56,	IGN,	IGN,	125,	87,	65,	61,
    348 /*50*/	IGN,	IGN,	29,	IGN,	68,	68,	64,	60,
    349 /*58*/	IGN,	IGN,	IGN,	42,	13,	67,	63,	59,
    350 };
    351 
    352 /* FUJITSU INTERTOP CX300 */
    353 static u_int8_t intertop_keytrans[] = {
    354 /*00	space   a2      1       tab     enter   caps    left    zenkaku	*/
    355 /*08	hiraga  a1      2       q       -       a       fnc     esc	*/
    356 /*10	ins     w       3       s       del     ]       down    x	*/
    357 /*18	z       e       4       d       a10     \       right   c	*/
    358 /*20	backsla r       ;       f       a9      @       ^       v	*/
    359 /*28	/       t       5       g       a8      p       -       b	*/
    360 /*30	.       y       6       h       a7      l       0       n	*/
    361 /*38	-       u       7       j       a5      o       bs      m	*/
    362 /*40	-       a3      8       a4      -       i       k       ,	*/
    363 /*48	num     :       9       [       a6      -       up      -	*/
    364 /*50	-       -       -       -       shift_L -       -       shift_R	*/
    365 /*58	ctrl    win     muhenka henkan  alt     -       -       -	*/
    366 /*----------------------------------------------------------------------*/
    367 /*00*/	57,	60,	2,	15,	28,	58,	77,	41,
    368 /*08*/	112,	59,	3,	16,	IGN,	30,	56,	1,
    369 /*10*/	210,	17,	4,	31,	83,	43,	80,	45,
    370 /*18*/	44,	18,	5,	32,	68,	125,	75,	46,
    371 /*20*/	115,	19,	39,	33,	67,	26,	13,	47,
    372 /*28*/	53,	20,	6,	34,	66,	25,	12,	48,
    373 /*30*/	52,	21,	7,	35,	65,	38,	11,	49,
    374 /*38*/	IGN,	22,	8,	36,	63,	24,	14,	50,
    375 /*40*/	IGN,	61,	9,	62,	IGN,	23,	37,	51,
    376 /*48*/	69,	40,	10,	27,	64,	IGN,	72,	IGN,
    377 /*50*/	IGN,	IGN,	IGN,	IGN,	42,	IGN,	IGN,	54,
    378 /*58*/	29,	221,	123,	121,	184,	IGN,	IGN,	IGN,
    379 };
    380 
    381 /* DoCoMo sigmarion (Japan) */
    382 static u_int8_t sigmarion_jp_keytrans[] = {
    383 /*00	right	ent	p	.	y	b	z	space	*/
    384 /*08	down	/	o	,	t	v	a	nfer	*/
    385 /*10	left	\	i	m	r	c	w	menu	*/
    386 /*18	|	-	u	-	e	x	q	1	*/
    387 /*20	pgdn	h/z	0	l	:	g	tab	f1	*/
    388 /*28	xfer	;	9	n	5	f	2	k	*/
    389 /*30	up	[	8	j	4	d	6	-	*/
    390 /*38	-	@	7	h	3	]	s	-	*/
    391 /*40	caps	-	-	-	bs	fnc	f8	f3	*/
    392 /*48	-	alt	-	-	^	k/h	f7	f4	*/
    393 /*50	-	-	ctrl	-	f10	pgup	f6	f2	*/
    394 /*58	-	-	-	shift	del	f9	f5	esc	*/
    395 /*----------------------------------------------------------------------*/
    396 /*00*/	 77,	 28,	 25,	 52,	 21,	 48,	 44,	 57,
    397 /*08*/	 80,	 53,	 24,	 51,	 20,	 47,	 30,	123,
    398 /*10*/	 75,	115,	 23,	 50,	 19,	 46,	 17,	221,
    399 /*18*/	125,	IGN,	 22,	IGN,	 18,	 45,	 16,	  2,
    400 /*20*/	 81,	 41,	 11,	 38,	 40,	 34,	 15,	IGN,
    401 /*28*/	121,	 39,	 10,	 49,	  6,	 33,	  3,	 37,
    402 /*30*/	 72,	 27,	  9,	 36,	  5,	 32,	  7,	IGN,
    403 /*38*/	 12,	 26,	  8,	 35,	  4,	 43,	 31,	IGN,
    404 /*40*/	 58,	IGN,	IGN,	IGN,	 14,	184,	 66,	IGN,
    405 /*48*/	IGN,	 56,	IGN,	IGN,	 13,	112,	 65,	IGN,
    406 /*50*/	IGN,	IGN,	 29,	IGN,	 68,	 73,	 64,	IGN,
    407 /*58*/	IGN,	IGN,	IGN,	 42,	 14,	 67,	IGN,	  1,
    408 };
    409 
    410 static const keysym_t sigmarion_cmdmap[] = {
    411 /*	pos      command		normal		shifted		*/
    412 	KC(184), KS_Cmd,		KS_Alt_R,	KS_Multi_key,
    413 	KC(64),  KS_Cmd_Screen1,	KS_f6,		KS_f1,
    414 	KC(65),  KS_Cmd_Screen2,	KS_f7,		KS_f2,
    415 	KC(66),  KS_Cmd_Screen3,	KS_f8,		KS_f3,
    416 	KC(67),  KS_Cmd_Screen4,	KS_f9,		KS_f4,
    417 	KC(68),  KS_Cmd_Screen5,	KS_f10,		KS_f5,
    418 	KC(27),  KS_Cmd_BrightnessUp,	KS_bracketleft,	KS_braceleft,
    419 	KC(43),  KS_Cmd_BrightnessDown,	KS_bracketright,KS_braceright,
    420 	KC(51),  KS_Cmd_ContrastDown,	KS_comma,	KS_less,
    421 	KC(52),  KS_Cmd_ContrastUp,	KS_period,	KS_greater,
    422 	KC(57),  KS_Cmd_BacklightToggle,KS_space,
    423 };
    424 #endif /* hpcmips */
    425 
    426 #ifdef hpcsh
    427 /* HP Jornada 680/690 (Japanese) */
    428 const u_int8_t jornada6x0_jp_keytrans[] = {
    429 /*      0    1    2    3    4    5    6    7 */
    430 /* 0 */ 59 , 45 , 31 , 17 , 3  , UNK, 29 , UNK, /* ctrl 29 */
    431 /* 1 */ 60 , 46 , 32 , 18 , 4  , 42 , UNK, UNK, /* shift L 42 */
    432 /* 2 */ 61 , 47 , 33 , 19 , 5  , UNK, 57 , UNK,
    433 /* 3 */ 66 , 52 , 38 , 24 , 10 , UNK, 14 , 203,
    434 /* 4 */ 65 , 51 , 37 , 23 , 9  , UNK, 115, UNK,
    435 /* 5 */ 64 , 50 , 36 , 22 , 8  , UNK, 121, UNK,
    436 /* 6 */ 62 , 48 , 34 , 20 , 6  , UNK, UNK, 56 , /* alt 56 */
    437 /* 7 */ 63 , 49 , 35 , 21 , 7  , UNK, UNK, 123,
    438 /* 8 */ IGN, 53 , 39 , 25 , 11 , 200, UNK, 208,
    439 /* 9 */ 112, 40 , 27 , 26 , 12 , 125, UNK, 205,
    440 /*10 */ 41 , 28 , 43 , 14 , 13 , 54 , UNK, UNK, /* shift R 54 */
    441 /*11 */ SPL, IGN, IGN, IGN, IGN, IGN, IGN, IGN,
    442 /*12 */ 1  , 44 , 30 , 16 , 2  , 15 , 221, UNK,
    443 /*13 */ UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK,
    444 /*14 */ UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK,
    445 /*15 */ UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK,
    446 };
    447 
    448 const int jornada6x0_jp_special_keymap[] = {
    449 	[KEY_SPECIAL_OFF]	= 88,
    450 	[KEY_SPECIAL_LIGHT]	= -1
    451 };
    452 
    453 #endif /* hpcsh */
    454 
    455 const struct hpckbd_keymap_table {
    456 	platid_t	*ht_platform;
    457 	const u_int8_t	*ht_keymap;
    458 	const int	*ht_special;
    459 	struct {
    460 		const keysym_t	*map;
    461 		int size;
    462 	} ht_cmdmap;
    463 	kbd_t		ht_layout;
    464 } hpckbd_keymap_table[] = {
    465 #ifdef hpcmips
    466 	{	&platid_mask_MACH_COMPAQ_C,
    467 		tc5165_compaq_c_jp_keymap,
    468 		tc5165_compaq_c_jp_special_keymap,
    469 		NULLCMDMAP,
    470 		KB_JP },
    471 	{	&platid_mask_MACH_VICTOR_INTERLINK,
    472 		m38813c_keymap,
    473 		default_special_keymap,
    474 		NULLCMDMAP,
    475 		KB_JP },
    476 	{	&platid_mask_MACH_SHARP_TELIOS,
    477 		tc5165_telios_jp_keymap,
    478 		default_special_keymap,
    479 		NULLCMDMAP,
    480 		KB_JP },
    481 	{	&platid_mask_MACH_SHARP_MOBILON,
    482 		tc5165_mobilon_keymap,
    483 		tc5165_mobilon_special_keymap,
    484 		NULLCMDMAP,
    485 		KB_US },
    486 	{	&platid_mask_MACH_NEC_MCR_500A,
    487 		mobilepro750c_keytrans,
    488 		NULL,
    489 		NULLCMDMAP,
    490 		KB_US },
    491 	{	&platid_mask_MACH_NEC_MCR_520A,
    492 		mobilepro_keytrans,
    493 		NULL,
    494 		NULLCMDMAP,
    495 		KB_US },
    496 	{	&platid_mask_MACH_NEC_MCR_530A,
    497 		mobilepro_keytrans,
    498 		NULL,
    499 		NULLCMDMAP,
    500 		KB_US },
    501 	{	&platid_mask_MACH_NEC_MCR_700A,
    502 		mobilepro_keytrans,
    503 		NULL,
    504 		NULLCMDMAP,
    505 		KB_US },
    506 	{	&platid_mask_MACH_NEC_MCR_730A,
    507 		mobilepro_keytrans,
    508 		NULL,
    509 		NULLCMDMAP,
    510 		KB_US },
    511 	{	&platid_mask_MACH_NEC_MCR_MPRO700,
    512 		mobilepro_keytrans,
    513 		NULL,
    514 		NULLCMDMAP,
    515 		KB_US },
    516 	{	&platid_mask_MACH_NEC_MCR_SIGMARION,
    517 		sigmarion_jp_keytrans,
    518 		NULL,
    519 		CMDMAP(sigmarion_cmdmap),
    520 		KB_JP },
    521 	{	&platid_mask_MACH_NEC_MCR,
    522 		mcr_jp_keytrans,
    523 		NULL,
    524 		CMDMAP(mcr_jp_cmdmap),
    525 		KB_JP },
    526 	{	&platid_mask_MACH_IBM_WORKPAD_Z50,
    527 		z50_keytrans,
    528 		NULL,
    529 		NULLCMDMAP,
    530 		KB_US },
    531 	{	&platid_mask_MACH_SHARP_TRIPAD,
    532 		tripad_keytrans,
    533 		NULL,
    534 		NULLCMDMAP,
    535 		KB_US },
    536 	{	&platid_mask_MACH_VADEM_CLIO_C,
    537 		tripad_keytrans,
    538 		NULL,
    539 		NULLCMDMAP,
    540 		KB_US },
    541 	{	&platid_mask_MACH_NEC_MCCS,
    542 		mccs_keytrans,
    543 		NULL,
    544 		CMDMAP(mccs_cmdmap),
    545 		KB_JP },
    546 	{	&platid_mask_MACH_FUJITSU_INTERTOP,
    547 		intertop_keytrans,
    548 		NULL,
    549 		NULLCMDMAP,
    550 		KB_JP },
    551 #endif /* hpcmips */
    552 #ifdef hpcsh
    553 	{	&platid_mask_MACH_HP_JORNADA_690JP,
    554 		jornada6x0_jp_keytrans,
    555 		jornada6x0_jp_special_keymap,
    556 		NULLCMDMAP,
    557 		KB_JP },
    558 	{	&platid_mask_MACH_HP_JORNADA_680JP,
    559 		jornada6x0_jp_keytrans,
    560 		jornada6x0_jp_special_keymap,
    561 		NULLCMDMAP,
    562 		KB_JP },
    563 #endif /* hpcsh */
    564 	{ NULL } /* end mark */
    565 };
    566