hilkbdmap.c revision 1.2.2.2 1 1.2.2.2 rmind /* $OpenBSD: hilkbdmap.c,v 1.7 2005/05/07 22:42:30 miod Exp $ */
2 1.2.2.2 rmind /*
3 1.2.2.2 rmind * Copyright (c) 2003, Miodrag Vallat.
4 1.2.2.2 rmind * All rights reserved.
5 1.2.2.2 rmind *
6 1.2.2.2 rmind * Redistribution and use in source and binary forms, with or without
7 1.2.2.2 rmind * modification, are permitted provided that the following conditions
8 1.2.2.2 rmind * are met:
9 1.2.2.2 rmind * 1. Redistributions of source code must retain the above copyright
10 1.2.2.2 rmind * notice, this list of conditions and the following disclaimer.
11 1.2.2.2 rmind * 2. Redistributions in binary form must reproduce the above copyright
12 1.2.2.2 rmind * notice, this list of conditions and the following disclaimer in the
13 1.2.2.2 rmind * documentation and/or other materials provided with the distribution.
14 1.2.2.2 rmind *
15 1.2.2.2 rmind * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
16 1.2.2.2 rmind * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
17 1.2.2.2 rmind * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
18 1.2.2.2 rmind * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,
19 1.2.2.2 rmind * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
20 1.2.2.2 rmind * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
21 1.2.2.2 rmind * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
22 1.2.2.2 rmind * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
23 1.2.2.2 rmind * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
24 1.2.2.2 rmind * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
25 1.2.2.2 rmind * POSSIBILITY OF SUCH DAMAGE.
26 1.2.2.2 rmind *
27 1.2.2.2 rmind */
28 1.2.2.2 rmind
29 1.2.2.2 rmind #include "opt_wsdisplay_compat.h"
30 1.2.2.2 rmind
31 1.2.2.2 rmind #include <sys/types.h>
32 1.2.2.2 rmind #include <dev/wscons/wsksymdef.h>
33 1.2.2.2 rmind #include <dev/wscons/wsksymvar.h>
34 1.2.2.2 rmind #include <dev/hil/hilkbdmap.h>
35 1.2.2.2 rmind
36 1.2.2.2 rmind #ifdef WSDISPLAY_COMPAT_RAWKBD
37 1.2.2.2 rmind
38 1.2.2.2 rmind /*
39 1.2.2.2 rmind * Translate HIL keycodes to US keyboard XT scancodes, for proper
40 1.2.2.2 rmind * X11-over-wsmux operation.
41 1.2.2.2 rmind *
42 1.2.2.2 rmind * XXX: Needs re-think how we should treat RAWKBD code on NetBSD.
43 1.2.2.2 rmind */
44 1.2.2.2 rmind const uint8_t hilkbd_raw[0x80] = {
45 1.2.2.2 rmind 0x9d, 0x00, 0xb8, 0x38, 0x36, 0x2a, 0x1d, 0x6a,
46 1.2.2.2 rmind 0x4b, 0x48, 0x4c, 0x49, 0x4d, 0x47, 0x53, 0x9c,
47 1.2.2.2 rmind 0x4f, 0xb5, 0x50, 0x4e, 0x51, 0x37, 0x52, 0x4a,
48 1.2.2.2 rmind 0x30, 0x2f, 0x2e, 0x2d, 0x2c, 0x00, 0x00, 0x01,
49 1.2.2.2 rmind 0x00, 0x44, 0x00, 0x57, 0x53, 0x43, 0x0f, 0x58,
50 1.2.2.2 rmind 0x23, 0x22, 0x21, 0x20, 0x1f, 0x1e, 0x00, 0x3a,
51 1.2.2.2 rmind 0x16, 0x15, 0x14, 0x13, 0x12, 0x11, 0x10, 0x0f,
52 1.2.2.2 rmind 0x08, 0x07, 0x06, 0x05, 0x04, 0x03, 0x02, 0x29,
53 1.2.2.2 rmind 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
54 1.2.2.2 rmind 0x67, 0x3e, 0x3d, 0x3c, 0x3b, 0x00, 0x46, 0x1c,
55 1.2.2.2 rmind 0x45, 0x3f, 0x40, 0x41, 0x42, 0x00, 0x00, 0x00,
56 1.2.2.2 rmind 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x00, 0x00,
57 1.2.2.2 rmind 0x17, 0x18, 0x19, 0x1a, 0x1b, 0x2b, 0xd2, 0xd3,
58 1.2.2.2 rmind 0x24, 0x25, 0x26, 0x27, 0x28, 0x1c, 0xc7, 0xc9,
59 1.2.2.2 rmind 0x32, 0x33, 0x34, 0x35, 0x00, 0xcf, 0x00, 0xd1,
60 1.2.2.2 rmind 0x31, 0x39, 0x00, 0x00, 0xcb, 0xd0, 0xc8, 0xcd
61 1.2.2.2 rmind };
62 1.2.2.2 rmind #endif
63 1.2.2.2 rmind
64 1.2.2.2 rmind #define KC(n) KS_KEYCODE(n)
65 1.2.2.2 rmind
66 1.2.2.2 rmind /*
67 1.2.2.2 rmind * 1f. US ASCII
68 1.2.2.2 rmind *
69 1.2.2.2 rmind * We use the same table for PS/2 and old HIL keyboards, as the only
70 1.2.2.2 rmind * differences are a few keys which are only present in one of both layouts,
71 1.2.2.2 rmind * and the one-function-only keypad in the old HIL flavour (hilkbd.c knows
72 1.2.2.2 rmind * about this and does The Right Thing).
73 1.2.2.2 rmind */
74 1.2.2.2 rmind
75 1.2.2.2 rmind static const keysym_t hilkbd_keydesc_us[] = {
76 1.2.2.2 rmind /* pos command normal shifted */
77 1.2.2.2 rmind KC(0), KS_Cmd1, KS_Control_R,
78 1.2.2.2 rmind KC(2), KS_Cmd2, KS_Mode_switch, KS_Multi_key,
79 1.2.2.2 rmind KC(3), KS_Cmd2, KS_Alt_L,
80 1.2.2.2 rmind KC(4), KS_Cmd, KS_Shift_R,
81 1.2.2.2 rmind KC(5), KS_Cmd, KS_Shift_L,
82 1.2.2.2 rmind KC(6), KS_Cmd1, KS_Control_L,
83 1.2.2.2 rmind KC(7), KS_Cmd_Debugger, /* Break/Reset */
84 1.2.2.2 rmind KC(8), KS_KP_Left, KS_KP_4,
85 1.2.2.2 rmind KC(9), KS_KP_Up, KS_KP_8,
86 1.2.2.2 rmind KC(10), KS_KP_Begin, KS_KP_5,
87 1.2.2.2 rmind KC(11), KS_KP_Prior, KS_KP_9,
88 1.2.2.2 rmind KC(12), KS_KP_Right, KS_KP_6,
89 1.2.2.2 rmind KC(13), KS_KP_Home, KS_KP_7,
90 1.2.2.2 rmind KC(14), KS_KP_Separator,
91 1.2.2.2 rmind KC(15), KS_KP_Enter,
92 1.2.2.2 rmind KC(16), KS_KP_End, KS_KP_1,
93 1.2.2.2 rmind KC(17), KS_KP_Divide,
94 1.2.2.2 rmind KC(18), KS_KP_Down, KS_KP_2,
95 1.2.2.2 rmind KC(19), KS_KP_Add,
96 1.2.2.2 rmind KC(20), KS_KP_Next, KS_KP_3,
97 1.2.2.2 rmind KC(21), KS_KP_Multiply,
98 1.2.2.2 rmind KC(22), KS_KP_Insert, KS_KP_0,
99 1.2.2.2 rmind KC(23), KS_KP_Subtract,
100 1.2.2.2 rmind KC(24), KS_b,
101 1.2.2.2 rmind KC(25), KS_v, KS_V, KS_section,
102 1.2.2.2 rmind KC(26), KS_c, KS_C, KS_ccedilla,
103 1.2.2.2 rmind KC(27), KS_x, KS_X,
104 1.2.2.2 rmind KC(28), KS_z, KS_Z, KS_paragraph,
105 1.2.2.2 rmind /* 29 Kanji Left */
106 1.2.2.2 rmind
107 1.2.2.2 rmind KC(31), KS_Cmd_Debugger, KS_Escape, KS_Delete,
108 1.2.2.2 rmind KC(33), KS_Cmd_Screen9, KS_f10, /* also KS_KP_F2 */
109 1.2.2.2 rmind KC(35), KS_f11, /* also KS_KP_F3 */
110 1.2.2.2 rmind KC(36), KS_KP_Delete, KS_KP_Decimal,
111 1.2.2.2 rmind KC(37), KS_Cmd_Screen8, KS_f9, /* also KS_KP_F1 */
112 1.2.2.2 rmind KC(38), KS_Tab, /* numeric pad */
113 1.2.2.2 rmind KC(39), KS_f12, /* also KS_KP_F4 */
114 1.2.2.2 rmind KC(40), KS_h, KS_H, KS_yen,
115 1.2.2.2 rmind KC(41), KS_g, KS_G, KS_currency,
116 1.2.2.2 rmind KC(42), KS_f,
117 1.2.2.2 rmind KC(43), KS_d, KS_D, KS_eth,
118 1.2.2.2 rmind KC(44), KS_s, KS_S, KS_ssharp,
119 1.2.2.2 rmind KC(45), KS_a, KS_A, KS_aring,
120 1.2.2.2 rmind /* 46 Mode_Switch ??? */
121 1.2.2.2 rmind KC(47), KS_Caps_Lock,
122 1.2.2.2 rmind KC(48), KS_u, KS_U, KS_dead_diaeresis,
123 1.2.2.2 rmind KC(49), KS_y, KS_Y, KS_dead_circumflex,
124 1.2.2.2 rmind KC(50), KS_t, KS_T, KS_dead_grave,
125 1.2.2.2 rmind KC(51), KS_r, KS_R, KS_dead_acute,
126 1.2.2.2 rmind KC(52), KS_e, KS_E, KS_ae,
127 1.2.2.2 rmind KC(53), KS_w, KS_W, KS_asciitilde,
128 1.2.2.2 rmind KC(54), KS_q, KS_Q, KS_periodcentered,
129 1.2.2.2 rmind KC(55), KS_Tab,
130 1.2.2.2 rmind KC(56), KS_7, KS_ampersand, KS_backslash,
131 1.2.2.2 rmind KC(57), KS_6, KS_asciicircum, KS_asciicircum,
132 1.2.2.2 rmind KC(58), KS_5, KS_percent, KS_onehalf,
133 1.2.2.2 rmind KC(59), KS_4, KS_dollar,
134 1.2.2.2 rmind KS_onequarter, KS_threequarters,
135 1.2.2.2 rmind KC(60), KS_3, KS_numbersign, KS_numbersign,
136 1.2.2.2 rmind KC(61), KS_2, KS_at, KS_at,
137 1.2.2.2 rmind KC(62), KS_1, KS_exclam, KS_exclamdown,
138 1.2.2.2 rmind KC(63), KS_grave, KS_asciitilde,
139 1.2.2.2 rmind KS_guillemotleft,KS_guillemotright,
140 1.2.2.2 rmind
141 1.2.2.2 rmind KC(72), KS_Print_Screen, /* Menu */
142 1.2.2.2 rmind KC(73), KS_Cmd_Screen3, KS_f4,
143 1.2.2.2 rmind KC(74), KS_Cmd_Screen2, KS_f3,
144 1.2.2.2 rmind KC(75), KS_Cmd_Screen1, KS_f2,
145 1.2.2.2 rmind KC(76), KS_Cmd_Screen0, KS_f1,
146 1.2.2.2 rmind
147 1.2.2.2 rmind KC(78), KS_Hold_Screen,
148 1.2.2.2 rmind KC(79), KS_Return, KS_Print_Screen,
149 1.2.2.2 rmind KC(80), KS_Num_Lock, /* System/User */
150 1.2.2.2 rmind KC(81), KS_Cmd_Screen4, KS_f5,
151 1.2.2.2 rmind KC(82), KS_Cmd_Screen5, KS_f6,
152 1.2.2.2 rmind KC(83), KS_Cmd_Screen6, KS_f7,
153 1.2.2.2 rmind KC(84), KS_Cmd_Screen7, KS_f8,
154 1.2.2.2 rmind
155 1.2.2.2 rmind /* 86 Clear line */
156 1.2.2.2 rmind KC(87), KS_Clear,
157 1.2.2.2 rmind KC(88), KS_8, KS_asterisk,
158 1.2.2.2 rmind KS_bracketleft, KS_braceleft,
159 1.2.2.2 rmind KC(89), KS_9, KS_parenleft,
160 1.2.2.2 rmind KS_bracketright,KS_braceright,
161 1.2.2.2 rmind KC(90), KS_0, KS_parenright, KS_questiondown,
162 1.2.2.2 rmind KC(91), KS_minus, KS_underscore, KS_macron,
163 1.2.2.2 rmind KC(92), KS_equal, KS_plus, KS_plusminus,
164 1.2.2.2 rmind KC(93), KS_Cmd_ResetEmul, KS_Delete, /* Backspace */
165 1.2.2.2 rmind /* 94 Insert line */
166 1.2.2.2 rmind /* 95 Delete line */
167 1.2.2.2 rmind KC(96), KS_i, KS_I, KS_dead_tilde,
168 1.2.2.2 rmind KC(97), KS_o, KS_O, KS_oslash,
169 1.2.2.2 rmind KC(98), KS_p, KS_P, KS_thorn,
170 1.2.2.2 rmind KC(99), KS_bracketleft, KS_braceleft, KS_degree,
171 1.2.2.2 rmind KC(100), KS_bracketright,KS_braceright,
172 1.2.2.2 rmind KS_bar, KS_brokenbar,
173 1.2.2.2 rmind KC(101), KS_backslash, KS_bar, KS_mu,
174 1.2.2.2 rmind KC(102), KS_Insert,
175 1.2.2.2 rmind KC(103), KS_Delete,
176 1.2.2.2 rmind KC(104), KS_j, KS_J, KS_dollar,
177 1.2.2.2 rmind KC(105), KS_k, KS_K, KS_cent,
178 1.2.2.2 rmind KC(106), KS_l, KS_L, KS_sterling,
179 1.2.2.2 rmind KC(107), KS_semicolon, KS_colon,
180 1.2.2.2 rmind KC(108), KS_apostrophe, KS_quotedbl,
181 1.2.2.2 rmind KS_grave, KS_apostrophe,
182 1.2.2.2 rmind KC(109), KS_Return,
183 1.2.2.2 rmind KC(110), KS_Home,
184 1.2.2.2 rmind KC(111), KS_Prior,
185 1.2.2.2 rmind KC(112), KS_m, KS_M, KS_masculine,
186 1.2.2.2 rmind KC(113), KS_comma, KS_less, KS_less,
187 1.2.2.2 rmind KC(114), KS_period, KS_greater, KS_greater,
188 1.2.2.2 rmind KC(115), KS_slash, KS_question, KS_underscore,
189 1.2.2.2 rmind
190 1.2.2.2 rmind KC(117), KS_End, /* Select */
191 1.2.2.2 rmind
192 1.2.2.2 rmind KC(119), KS_Next,
193 1.2.2.2 rmind KC(120), KS_n, KS_N, KS_ordfeminine,
194 1.2.2.2 rmind KC(121), KS_space,
195 1.2.2.2 rmind
196 1.2.2.2 rmind /* 123 Kanji Right */
197 1.2.2.2 rmind KC(124), KS_Left,
198 1.2.2.2 rmind KC(125), KS_Down,
199 1.2.2.2 rmind KC(126), KS_Up,
200 1.2.2.2 rmind KC(127), KS_Right,
201 1.2.2.2 rmind };
202 1.2.2.2 rmind
203 1.2.2.2 rmind /*
204 1.2.2.2 rmind * 0e. Swedish
205 1.2.2.2 rmind */
206 1.2.2.2 rmind
207 1.2.2.2 rmind static const keysym_t hilkbd_keydesc_sv[] = {
208 1.2.2.2 rmind KC(56), KS_7, KS_slash, KS_backslash,
209 1.2.2.2 rmind KC(57), KS_6, KS_ampersand, KS_asciicircum,
210 1.2.2.2 rmind KC(61), KS_2, KS_quotedbl, KS_at,
211 1.2.2.2 rmind KC(63), KS_less, KS_greater,
212 1.2.2.2 rmind KS_guillemotleft,KS_guillemotright,
213 1.2.2.2 rmind KC(88), KS_8, KS_parenleft, KS_bracketleft, KS_braceleft,
214 1.2.2.2 rmind KC(89), KS_9, KS_parenright, KS_bracketright,KS_braceright,
215 1.2.2.2 rmind KC(90), KS_0, KS_equal, KS_exclamdown,
216 1.2.2.2 rmind KC(91), KS_plus, KS_question, KS_macron,
217 1.2.2.2 rmind KC(92), KS_eacute, KS_Eacute, KS_plusminus,
218 1.2.2.2 rmind KC(97), KS_aring, KS_Aring, KS_degree,
219 1.2.2.2 rmind KC(98), KS_udiaeresis, KS_Udiaeresis, KS_bar, KS_brokenbar,
220 1.2.2.2 rmind KC(99), KS_apostrophe, KS_asterisk, KS_mu,
221 1.2.2.2 rmind KC(107), KS_odiaeresis,
222 1.2.2.2 rmind KC(108), KS_adiaeresis, KS_Adiaeresis, KS_grave, KS_apostrophe,
223 1.2.2.2 rmind KC(113), KS_comma, KS_semicolon, KS_less,
224 1.2.2.2 rmind KC(114), KS_period, KS_colon, KS_greater,
225 1.2.2.2 rmind KC(115), KS_minus, KS_underscore, KS_underscore
226 1.2.2.2 rmind };
227 1.2.2.2 rmind
228 1.2.2.2 rmind static const keysym_t hilkbd_keydesc_sv_nodead[] = {
229 1.2.2.2 rmind KC(48), KS_u, KS_U, KS_diaeresis,
230 1.2.2.2 rmind KC(49), KS_y, KS_Y, KS_asciicircum,
231 1.2.2.2 rmind KC(50), KS_t, KS_T, KS_grave,
232 1.2.2.2 rmind KC(51), KS_r, KS_R, KS_apostrophe,
233 1.2.2.2 rmind KC(96), KS_i, KS_I, KS_asciitilde,
234 1.2.2.2 rmind };
235 1.2.2.2 rmind
236 1.2.2.2 rmind static const keysym_t hilkbd_keydesc_sv_ps2[] = {
237 1.2.2.2 rmind KC(24), KS_b,
238 1.2.2.2 rmind KC(25), KS_v,
239 1.2.2.2 rmind KC(26), KS_c,
240 1.2.2.2 rmind KC(27), KS_x,
241 1.2.2.2 rmind KC(28), KS_z,
242 1.2.2.2 rmind KC(36), KS_KP_Separator,KS_KP_Delete,
243 1.2.2.2 rmind KC(40), KS_h,
244 1.2.2.2 rmind KC(41), KS_g,
245 1.2.2.2 rmind KC(42), KS_f,
246 1.2.2.2 rmind KC(43), KS_d,
247 1.2.2.2 rmind KC(44), KS_s,
248 1.2.2.2 rmind KC(45), KS_a,
249 1.2.2.2 rmind KC(48), KS_u,
250 1.2.2.2 rmind KC(49), KS_y,
251 1.2.2.2 rmind KC(50), KS_t,
252 1.2.2.2 rmind KC(51), KS_r,
253 1.2.2.2 rmind KC(52), KS_e,
254 1.2.2.2 rmind KC(53), KS_w,
255 1.2.2.2 rmind KC(54), KS_q,
256 1.2.2.2 rmind KC(56), KS_7, KS_slash, KS_braceleft,
257 1.2.2.2 rmind KC(57), KS_6, KS_ampersand,
258 1.2.2.2 rmind KC(58), KS_5, KS_percent,
259 1.2.2.2 rmind KC(59), KS_4, KS_currency, KS_dollar,
260 1.2.2.2 rmind KC(60), KS_3, KS_numbersign, KS_sterling,
261 1.2.2.2 rmind KC(61), KS_2, KS_quotedbl, KS_at,
262 1.2.2.2 rmind KC(62), KS_1, KS_exclam,
263 1.2.2.2 rmind KC(63), KS_section, KS_onehalf,
264 1.2.2.2 rmind KC(88), KS_8, KS_parenleft, KS_bracketleft,
265 1.2.2.2 rmind KC(89), KS_9, KS_parenright, KS_bracketright,
266 1.2.2.2 rmind KC(90), KS_0, KS_equal, KS_braceright,
267 1.2.2.2 rmind KC(91), KS_minus, KS_question, KS_backslash,
268 1.2.2.2 rmind KC(92), KS_dead_acute, KS_dead_grave,
269 1.2.2.2 rmind KC(96), KS_i,
270 1.2.2.2 rmind KC(97), KS_o,
271 1.2.2.2 rmind KC(98), KS_p,
272 1.2.2.2 rmind KC(99), KS_aring,
273 1.2.2.2 rmind KC(100), KS_dead_diaeresis,KS_dead_circumflex,KS_dead_tilde,
274 1.2.2.2 rmind KC(104), KS_j,
275 1.2.2.2 rmind KC(105), KS_k,
276 1.2.2.2 rmind KC(106), KS_l,
277 1.2.2.2 rmind KC(107), KS_odiaeresis,
278 1.2.2.2 rmind KC(108), KS_adiaeresis,
279 1.2.2.2 rmind KC(112), KS_m,
280 1.2.2.2 rmind KC(113), KS_comma, KS_semicolon,
281 1.2.2.2 rmind KC(114), KS_period, KS_colon,
282 1.2.2.2 rmind KC(115), KS_minus, KS_underscore,
283 1.2.2.2 rmind KC(116), KS_apostrophe, KS_asterisk,
284 1.2.2.2 rmind KC(118), KS_less, KS_greater, KS_bar,
285 1.2.2.2 rmind KC(120), KS_n
286 1.2.2.2 rmind };
287 1.2.2.2 rmind
288 1.2.2.2 rmind static const keysym_t hilkbd_keydesc_sv_ps2_nodead[] = {
289 1.2.2.2 rmind KC(92), KS_apostrophe, KS_grave,
290 1.2.2.2 rmind KC(100), KS_diaeresis, KS_asciicircum, KS_asciitilde,
291 1.2.2.2 rmind };
292 1.2.2.2 rmind
293 1.2.2.2 rmind /*
294 1.2.2.2 rmind * 0f. German
295 1.2.2.2 rmind */
296 1.2.2.2 rmind
297 1.2.2.2 rmind static const keysym_t hilkbd_keydesc_de[] = {
298 1.2.2.2 rmind KC(28), KS_y, KS_Y, KS_paragraph,
299 1.2.2.2 rmind KC(49), KS_z, KS_Z, KS_dead_circumflex,
300 1.2.2.2 rmind KC(56), KS_7, KS_slash, KS_backslash,
301 1.2.2.2 rmind KC(57), KS_6, KS_ampersand, KS_asciicircum,
302 1.2.2.2 rmind KC(60), KS_3, KS_section, KS_numbersign,
303 1.2.2.2 rmind KC(61), KS_2, KS_quotedbl, KS_at,
304 1.2.2.2 rmind KC(63), KS_less, KS_greater,
305 1.2.2.2 rmind KS_guillemotleft,KS_guillemotright,
306 1.2.2.2 rmind KC(88), KS_8, KS_parenleft,
307 1.2.2.2 rmind KS_bracketleft, KS_braceleft,
308 1.2.2.2 rmind KC(89), KS_9, KS_parenright,
309 1.2.2.2 rmind KS_bracketright,KS_braceright,
310 1.2.2.2 rmind KC(90), KS_0, KS_equal, KS_exclamdown,
311 1.2.2.2 rmind KC(91), KS_ssharp, KS_question, KS_macron,
312 1.2.2.2 rmind KC(92), KS_dead_acute, KS_dead_grave, KS_plusminus,
313 1.2.2.2 rmind KC(99), KS_udiaeresis, KS_Udiaeresis, KS_dead_abovering,
314 1.2.2.2 rmind KC(100), KS_plus, KS_asterisk, KS_bar, KS_brokenbar,
315 1.2.2.2 rmind KC(101), KS_sterling, KS_dead_circumflex,KS_mu,
316 1.2.2.2 rmind KC(107), KS_odiaeresis,
317 1.2.2.2 rmind KC(108), KS_adiaeresis, KS_Adiaeresis, KS_grave, KS_apostrophe,
318 1.2.2.2 rmind KC(113), KS_comma, KS_semicolon, KS_less,
319 1.2.2.2 rmind KC(114), KS_period, KS_colon, KS_greater,
320 1.2.2.2 rmind KC(115), KS_minus, KS_underscore, KS_underscore
321 1.2.2.2 rmind };
322 1.2.2.2 rmind
323 1.2.2.2 rmind static const keysym_t hilkbd_keydesc_de_nodead[] = {
324 1.2.2.2 rmind KC(48), KS_u, KS_U, KS_diaeresis,
325 1.2.2.2 rmind KC(49), KS_z, KS_Z, KS_asciicircum,
326 1.2.2.2 rmind KC(50), KS_t, KS_T, KS_grave,
327 1.2.2.2 rmind KC(51), KS_r, KS_R, KS_apostrophe,
328 1.2.2.2 rmind KC(92), KS_apostrophe, KS_grave, KS_plusminus,
329 1.2.2.2 rmind KC(99), KS_udiaeresis, KS_Udiaeresis, KS_degree,
330 1.2.2.2 rmind KC(101), KS_sterling, KS_asciicircum, KS_mu,
331 1.2.2.2 rmind KC(96), KS_i, KS_I, KS_asciitilde
332 1.2.2.2 rmind };
333 1.2.2.2 rmind
334 1.2.2.2 rmind static const keysym_t hilkbd_keydesc_de_ps2[] = {
335 1.2.2.2 rmind KC(24), KS_b,
336 1.2.2.2 rmind KC(25), KS_v,
337 1.2.2.2 rmind KC(26), KS_c,
338 1.2.2.2 rmind KC(27), KS_x,
339 1.2.2.2 rmind KC(28), KS_y,
340 1.2.2.2 rmind KC(36), KS_KP_Separator,KS_KP_Delete,
341 1.2.2.2 rmind KC(40), KS_h,
342 1.2.2.2 rmind KC(41), KS_g,
343 1.2.2.2 rmind KC(42), KS_f,
344 1.2.2.2 rmind KC(43), KS_d,
345 1.2.2.2 rmind KC(44), KS_s,
346 1.2.2.2 rmind KC(45), KS_a,
347 1.2.2.2 rmind KC(48), KS_u,
348 1.2.2.2 rmind KC(49), KS_z, KS_Z, KS_dead_circumflex,
349 1.2.2.2 rmind KC(50), KS_t,
350 1.2.2.2 rmind KC(51), KS_r,
351 1.2.2.2 rmind KC(52), KS_e,
352 1.2.2.2 rmind KC(53), KS_w,
353 1.2.2.2 rmind KC(54), KS_q, KS_Q, KS_at,
354 1.2.2.2 rmind KC(56), KS_7, KS_slash, KS_braceleft,
355 1.2.2.2 rmind KC(57), KS_6, KS_ampersand,
356 1.2.2.2 rmind KC(58), KS_5, KS_percent,
357 1.2.2.2 rmind KC(59), KS_4, KS_dollar,
358 1.2.2.2 rmind KC(60), KS_3, KS_section, KS_threesuperior,
359 1.2.2.2 rmind KC(61), KS_2, KS_quotedbl, KS_twosuperior,
360 1.2.2.2 rmind KC(62), KS_1, KS_exclam,
361 1.2.2.2 rmind KC(63), KS_dead_circumflex, KS_dead_abovering,
362 1.2.2.2 rmind KC(88), KS_8, KS_parenleft, KS_bracketleft,
363 1.2.2.2 rmind KC(89), KS_9, KS_parenright, KS_bracketright,
364 1.2.2.2 rmind KC(90), KS_0, KS_equal, KS_braceright,
365 1.2.2.2 rmind KC(91), KS_ssharp, KS_question, KS_backslash,
366 1.2.2.2 rmind KC(92), KS_dead_acute, KS_dead_grave,
367 1.2.2.2 rmind KC(96), KS_i,
368 1.2.2.2 rmind KC(97), KS_o,
369 1.2.2.2 rmind KC(98), KS_p,
370 1.2.2.2 rmind KC(99), KS_udiaeresis,
371 1.2.2.2 rmind KC(100), KS_plus, KS_asterisk, KS_dead_tilde,
372 1.2.2.2 rmind KC(104), KS_j,
373 1.2.2.2 rmind KC(105), KS_k,
374 1.2.2.2 rmind KC(106), KS_l,
375 1.2.2.2 rmind KC(107), KS_odiaeresis,
376 1.2.2.2 rmind KC(108), KS_adiaeresis,
377 1.2.2.2 rmind KC(112), KS_m, KS_M, KS_mu,
378 1.2.2.2 rmind KC(113), KS_comma, KS_semicolon,
379 1.2.2.2 rmind KC(114), KS_period, KS_colon,
380 1.2.2.2 rmind KC(115), KS_minus, KS_underscore,
381 1.2.2.2 rmind KC(116), KS_numbersign, KS_apostrophe,
382 1.2.2.2 rmind KC(118), KS_less, KS_greater, KS_bar,
383 1.2.2.2 rmind KC(120), KS_n
384 1.2.2.2 rmind };
385 1.2.2.2 rmind
386 1.2.2.2 rmind static const keysym_t hilkbd_keydesc_de_ps2_nodead[] = {
387 1.2.2.2 rmind KC(49), KS_z, KS_Z, KS_asciicircum,
388 1.2.2.2 rmind KC(63), KS_asciicircum, KS_degree,
389 1.2.2.2 rmind KC(92), KS_apostrophe, KS_grave,
390 1.2.2.2 rmind KC(100), KS_plus, KS_asterisk, KS_asciitilde
391 1.2.2.2 rmind };
392 1.2.2.2 rmind
393 1.2.2.2 rmind /*
394 1.2.2.2 rmind * 17. English
395 1.2.2.2 rmind */
396 1.2.2.2 rmind
397 1.2.2.2 rmind static const keysym_t hilkbd_keydesc_uk[] = {
398 1.2.2.2 rmind KC(56), KS_7, KS_asciicircum, KS_backslash,
399 1.2.2.2 rmind KC(57), KS_6, KS_ampersand, KS_asciicircum,
400 1.2.2.2 rmind KC(60), KS_3, KS_sterling, KS_numbersign,
401 1.2.2.2 rmind KC(61), KS_2, KS_quotedbl, KS_at,
402 1.2.2.2 rmind KC(88), KS_8, KS_parenleft, KS_bracketleft, KS_braceleft,
403 1.2.2.2 rmind KC(89), KS_9, KS_parenright, KS_bracketright,KS_braceright,
404 1.2.2.2 rmind KC(90), KS_0, KS_equal, KS_questiondown,
405 1.2.2.2 rmind KC(91), KS_plus, KS_question, KS_macron,
406 1.2.2.2 rmind KC(92), KS_apostrophe, KS_slash, KS_plusminus,
407 1.2.2.2 rmind KC(101), KS_less, KS_greater, KS_mu,
408 1.2.2.2 rmind KC(107), KS_asterisk, KS_at,
409 1.2.2.2 rmind KC(108), KS_backslash, KS_bar, KS_grave, KS_apostrophe,
410 1.2.2.2 rmind KC(113), KS_comma, KS_semicolon, KS_less,
411 1.2.2.2 rmind KC(114), KS_period, KS_colon, KS_greater,
412 1.2.2.2 rmind KC(115), KS_minus, KS_underscore, KS_underscore
413 1.2.2.2 rmind };
414 1.2.2.2 rmind
415 1.2.2.2 rmind static const keysym_t hilkbd_keydesc_uk_ps2[] = {
416 1.2.2.2 rmind KC(24), KS_b,
417 1.2.2.2 rmind KC(25), KS_v,
418 1.2.2.2 rmind KC(26), KS_c,
419 1.2.2.2 rmind KC(27), KS_x,
420 1.2.2.2 rmind KC(28), KS_z,
421 1.2.2.2 rmind KC(40), KS_h,
422 1.2.2.2 rmind KC(41), KS_g,
423 1.2.2.2 rmind KC(42), KS_f,
424 1.2.2.2 rmind KC(43), KS_d,
425 1.2.2.2 rmind KC(44), KS_s,
426 1.2.2.2 rmind KC(45), KS_a,
427 1.2.2.2 rmind KC(48), KS_u,
428 1.2.2.2 rmind KC(49), KS_y,
429 1.2.2.2 rmind KC(50), KS_t,
430 1.2.2.2 rmind KC(51), KS_r,
431 1.2.2.2 rmind KC(52), KS_e,
432 1.2.2.2 rmind KC(53), KS_w,
433 1.2.2.2 rmind KC(54), KS_q,
434 1.2.2.2 rmind KC(56), KS_7, KS_ampersand,
435 1.2.2.2 rmind KC(57), KS_6, KS_asciicircum,
436 1.2.2.2 rmind KC(58), KS_5, KS_percent,
437 1.2.2.2 rmind KC(59), KS_4, KS_dollar,
438 1.2.2.2 rmind KC(60), KS_3, KS_sterling,
439 1.2.2.2 rmind KC(61), KS_2, KS_quotedbl,
440 1.2.2.2 rmind KC(62), KS_1, KS_exclam,
441 1.2.2.2 rmind KC(63), KS_grave, KS_notsign, KS_bar,
442 1.2.2.2 rmind KC(88), KS_8, KS_asterisk,
443 1.2.2.2 rmind KC(89), KS_9, KS_parenleft,
444 1.2.2.2 rmind KC(90), KS_0, KS_parenright,
445 1.2.2.2 rmind KC(91), KS_minus, KS_underscore,
446 1.2.2.2 rmind KC(92), KS_equal, KS_plus,
447 1.2.2.2 rmind KC(96), KS_i,
448 1.2.2.2 rmind KC(97), KS_o,
449 1.2.2.2 rmind KC(98), KS_p,
450 1.2.2.2 rmind KC(99), KS_bracketleft, KS_braceleft,
451 1.2.2.2 rmind KC(100), KS_bracketright,KS_braceright,
452 1.2.2.2 rmind KC(104), KS_j,
453 1.2.2.2 rmind KC(105), KS_k,
454 1.2.2.2 rmind KC(106), KS_l,
455 1.2.2.2 rmind KC(107), KS_semicolon, KS_colon,
456 1.2.2.2 rmind KC(108), KS_apostrophe, KS_at,
457 1.2.2.2 rmind KC(112), KS_m,
458 1.2.2.2 rmind KC(113), KS_comma, KS_less,
459 1.2.2.2 rmind KC(114), KS_period, KS_greater,
460 1.2.2.2 rmind KC(115), KS_slash, KS_question,
461 1.2.2.2 rmind KC(116), KS_numbersign, KS_asciitilde,
462 1.2.2.2 rmind KC(118), KS_backslash, KS_brokenbar,
463 1.2.2.2 rmind KC(120), KS_n
464 1.2.2.2 rmind };
465 1.2.2.2 rmind
466 1.2.2.2 rmind /*
467 1.2.2.2 rmind * 1b. French
468 1.2.2.2 rmind */
469 1.2.2.2 rmind
470 1.2.2.2 rmind static const keysym_t hilkbd_keydesc_fr[] = {
471 1.2.2.2 rmind KC(28), KS_w, KS_W, KS_paragraph,
472 1.2.2.2 rmind KC(45), KS_q, KS_Q, KS_aring,
473 1.2.2.2 rmind KC(53), KS_z, KS_Z, KS_asciitilde,
474 1.2.2.2 rmind KC(54), KS_a, KS_A, KS_periodcentered,
475 1.2.2.2 rmind KC(56), KS_egrave, KS_7, KS_backslash,
476 1.2.2.2 rmind KC(57), KS_section, KS_6, KS_asciicircum,
477 1.2.2.2 rmind KC(58), KS_parenleft, KS_5, KS_onehalf,
478 1.2.2.2 rmind KC(59), KS_apostrophe, KS_4, KS_onequarter, KS_threequarters,
479 1.2.2.2 rmind KC(60), KS_quotedbl, KS_3, KS_numbersign,
480 1.2.2.2 rmind KC(61), KS_eacute, KS_2, KS_at,
481 1.2.2.2 rmind KC(62), KS_ampersand, KS_1, KS_exclamdown,
482 1.2.2.2 rmind KC(63), KS_dollar, KS_sterling,
483 1.2.2.2 rmind KS_guillemotleft,KS_guillemotright,
484 1.2.2.2 rmind KC(88), KS_exclam, KS_8, KS_bracketleft, KS_braceleft,
485 1.2.2.2 rmind KC(89), KS_ccedilla, KS_9, KS_bracketright,KS_braceright,
486 1.2.2.2 rmind KC(90), KS_agrave, KS_0, KS_questiondown,
487 1.2.2.2 rmind KC(91), KS_parenright, KS_degree, KS_macron,
488 1.2.2.2 rmind KC(92), KS_minus, KS_underscore, KS_plusminus,
489 1.2.2.2 rmind KC(99), KS_dead_circumflex, KS_dead_diaeresis, KS_dead_abovering,
490 1.2.2.2 rmind KC(100), KS_grave, KS_asterisk, KS_bar, KS_brokenbar,
491 1.2.2.2 rmind KC(101), KS_less, KS_greater, KS_mu,
492 1.2.2.2 rmind KC(107), KS_m,
493 1.2.2.2 rmind KC(108), KS_ugrave, KS_percent, KS_grave, KS_apostrophe,
494 1.2.2.2 rmind KC(112), KS_comma, KS_question, KS_masculine,
495 1.2.2.2 rmind KC(113), KS_semicolon, KS_period, KS_less,
496 1.2.2.2 rmind KC(114), KS_colon, KS_slash, KS_greater,
497 1.2.2.2 rmind KC(115), KS_equal, KS_plus, KS_underscore
498 1.2.2.2 rmind };
499 1.2.2.2 rmind
500 1.2.2.2 rmind static const keysym_t hilkbd_keydesc_fr_ps2[] = {
501 1.2.2.2 rmind KC(24), KS_b,
502 1.2.2.2 rmind KC(25), KS_v,
503 1.2.2.2 rmind KC(26), KS_c,
504 1.2.2.2 rmind KC(27), KS_x,
505 1.2.2.2 rmind KC(28), KS_w,
506 1.2.2.2 rmind KC(40), KS_h,
507 1.2.2.2 rmind KC(41), KS_g,
508 1.2.2.2 rmind KC(42), KS_f,
509 1.2.2.2 rmind KC(43), KS_d,
510 1.2.2.2 rmind KC(44), KS_s,
511 1.2.2.2 rmind KC(45), KS_q,
512 1.2.2.2 rmind KC(48), KS_u,
513 1.2.2.2 rmind KC(49), KS_y,
514 1.2.2.2 rmind KC(50), KS_t,
515 1.2.2.2 rmind KC(51), KS_r,
516 1.2.2.2 rmind KC(52), KS_e,
517 1.2.2.2 rmind KC(53), KS_z,
518 1.2.2.2 rmind KC(54), KS_a,
519 1.2.2.2 rmind KC(56), KS_egrave, KS_7, KS_grave,
520 1.2.2.2 rmind KC(57), KS_minus, KS_6, KS_bar,
521 1.2.2.2 rmind KC(58), KS_parenleft, KS_5, KS_bracketleft,
522 1.2.2.2 rmind KC(59), KS_apostrophe, KS_4, KS_braceleft,
523 1.2.2.2 rmind KC(60), KS_quotedbl, KS_3, KS_numbersign,
524 1.2.2.2 rmind KC(61), KS_eacute, KS_2, KS_asciitilde,
525 1.2.2.2 rmind KC(62), KS_ampersand, KS_1,
526 1.2.2.2 rmind KC(63), KS_twosuperior,
527 1.2.2.2 rmind KC(88), KS_underscore, KS_8, KS_backslash,
528 1.2.2.2 rmind KC(89), KS_ccedilla, KS_9, KS_asciicircum,
529 1.2.2.2 rmind KC(90), KS_agrave, KS_0, KS_at,
530 1.2.2.2 rmind KC(91), KS_parenright, KS_degree, KS_bracketright,
531 1.2.2.2 rmind KC(92), KS_equal, KS_plus, KS_braceright,
532 1.2.2.2 rmind KC(96), KS_i,
533 1.2.2.2 rmind KC(97), KS_o,
534 1.2.2.2 rmind KC(98), KS_p,
535 1.2.2.2 rmind KC(99), KS_dead_circumflex,KS_dead_diaeresis,
536 1.2.2.2 rmind KC(100), KS_dollar, KS_sterling, KS_currency,
537 1.2.2.2 rmind KC(104), KS_j,
538 1.2.2.2 rmind KC(105), KS_k,
539 1.2.2.2 rmind KC(106), KS_l,
540 1.2.2.2 rmind KC(107), KS_m,
541 1.2.2.2 rmind KC(108), KS_ugrave, KS_percent,
542 1.2.2.2 rmind KC(112), KS_comma, KS_question,
543 1.2.2.2 rmind KC(113), KS_semicolon, KS_period,
544 1.2.2.2 rmind KC(114), KS_colon, KS_slash,
545 1.2.2.2 rmind KC(115), KS_exclam, KS_section,
546 1.2.2.2 rmind KC(116), KS_asterisk, KS_mu,
547 1.2.2.2 rmind KC(118), KS_less, KS_greater,
548 1.2.2.2 rmind KS_guillemotleft,KS_guillemotright,
549 1.2.2.2 rmind KC(120), KS_n
550 1.2.2.2 rmind };
551 1.2.2.2 rmind
552 1.2.2.2 rmind #define KBD_MAP(name, base, map) \
553 1.2.2.2 rmind { name, base, sizeof(map)/sizeof(keysym_t), map }
554 1.2.2.2 rmind
555 1.2.2.2 rmind const struct wscons_keydesc hilkbd_keydesctab[] = {
556 1.2.2.2 rmind KBD_MAP(KB_US, 0, hilkbd_keydesc_us),
557 1.2.2.2 rmind KBD_MAP(KB_DE, KB_US, hilkbd_keydesc_de),
558 1.2.2.2 rmind KBD_MAP(KB_DE | KB_NODEAD, KB_DE, hilkbd_keydesc_de_nodead),
559 1.2.2.2 rmind KBD_MAP(KB_FR, KB_US, hilkbd_keydesc_fr),
560 1.2.2.2 rmind KBD_MAP(KB_UK, KB_US, hilkbd_keydesc_uk),
561 1.2.2.2 rmind KBD_MAP(KB_SV, KB_US, hilkbd_keydesc_sv),
562 1.2.2.2 rmind KBD_MAP(KB_SV | KB_NODEAD, KB_SV, hilkbd_keydesc_sv_nodead),
563 1.2.2.2 rmind {0, 0, 0, 0},
564 1.2.2.2 rmind };
565 1.2.2.2 rmind
566 1.2.2.2 rmind const struct wscons_keydesc hilkbd_keydesctab_ps2[] = {
567 1.2.2.2 rmind KBD_MAP(KB_US, 0, hilkbd_keydesc_us),
568 1.2.2.2 rmind KBD_MAP(KB_DE, KB_US, hilkbd_keydesc_de_ps2),
569 1.2.2.2 rmind KBD_MAP(KB_DE | KB_NODEAD, KB_DE, hilkbd_keydesc_de_ps2_nodead),
570 1.2.2.2 rmind KBD_MAP(KB_FR, KB_US, hilkbd_keydesc_fr_ps2),
571 1.2.2.2 rmind KBD_MAP(KB_UK, KB_US, hilkbd_keydesc_uk_ps2),
572 1.2.2.2 rmind KBD_MAP(KB_SV, KB_US, hilkbd_keydesc_sv_ps2),
573 1.2.2.2 rmind KBD_MAP(KB_SV | KB_NODEAD, KB_SV, hilkbd_keydesc_sv_ps2_nodead),
574 1.2.2.2 rmind {0, 0, 0, 0},
575 1.2.2.2 rmind };
576 1.2.2.2 rmind
577 1.2.2.2 rmind /*
578 1.2.2.2 rmind * Keyboard ID to layout table
579 1.2.2.2 rmind */
580 1.2.2.2 rmind const kbd_t hilkbd_layouts[MAXHILKBDLAYOUT] = {
581 1.2.2.2 rmind -1, /* 00 Undefined or custom layout */
582 1.2.2.2 rmind -1, /* 01 Undefined */
583 1.2.2.2 rmind -1, /* 02 Japanese */
584 1.2.2.2 rmind -1, /* 03 Swiss french */
585 1.2.2.2 rmind -1, /* 04 Portuguese */
586 1.2.2.2 rmind -1, /* 05 Arabic */
587 1.2.2.2 rmind -1, /* 06 Hebrew */
588 1.2.2.2 rmind -1, /* 07 Canadian English */
589 1.2.2.2 rmind -1, /* 08 Turkish */
590 1.2.2.2 rmind -1, /* 09 Greek */
591 1.2.2.2 rmind -1, /* 0a Thai */
592 1.2.2.2 rmind -1, /* 0b Italian */
593 1.2.2.2 rmind -1, /* 0c Korean */
594 1.2.2.2 rmind -1, /* 0d Dutch */
595 1.2.2.2 rmind KB_SV, /* 0e Swedish */
596 1.2.2.2 rmind KB_DE, /* 0f German */
597 1.2.2.2 rmind -1, /* 10 Simplified Chinese */
598 1.2.2.2 rmind -1, /* 11 Traditional Chinese */
599 1.2.2.2 rmind -1, /* 12 Swiss French 2 */
600 1.2.2.2 rmind -1, /* 13 Euro Spanish */
601 1.2.2.2 rmind -1, /* 14 Swiss German 2 */
602 1.2.2.2 rmind -1, /* 15 Belgian */
603 1.2.2.2 rmind -1, /* 16 Finnish */
604 1.2.2.2 rmind KB_UK, /* 17 UK English */
605 1.2.2.2 rmind -1, /* 18 Canadian French */
606 1.2.2.2 rmind -1, /* 19 Swiss German */
607 1.2.2.2 rmind -1, /* 1a Norwegian */
608 1.2.2.2 rmind KB_FR, /* 1b French */
609 1.2.2.2 rmind -1, /* 1c Danish */
610 1.2.2.2 rmind -1, /* 1d Katakana */
611 1.2.2.2 rmind -1, /* 1e Latin Spanish */
612 1.2.2.2 rmind KB_US, /* 1f US ASCII */
613 1.2.2.2 rmind };
614