dnkbdmap.c revision 1.2.2.3 1 1.2.2.3 bouyer /* $NetBSD: dnkbdmap.c,v 1.2.2.3 2011/03/05 15:09:40 bouyer Exp $ */
2 1.2.2.2 bouyer /* $OpenBSD: dnkbdmap.c,v 1.2 2005/05/06 22:22:53 miod Exp $ */
3 1.2.2.2 bouyer /*
4 1.2.2.2 bouyer * Copyright (c) 2005, Miodrag Vallat
5 1.2.2.2 bouyer *
6 1.2.2.2 bouyer * Redistribution and use in source and binary forms, with or without
7 1.2.2.2 bouyer * modification, are permitted provided that the following conditions
8 1.2.2.2 bouyer * are met:
9 1.2.2.2 bouyer * 1. Redistributions of source code must retain the above copyright
10 1.2.2.2 bouyer * notice, this list of conditions and the following disclaimer.
11 1.2.2.2 bouyer * 2. Redistributions in binary form must reproduce the above copyright
12 1.2.2.2 bouyer * notice, this list of conditions and the following disclaimer in the
13 1.2.2.2 bouyer * documentation and/or other materials provided with the distribution.
14 1.2.2.2 bouyer *
15 1.2.2.2 bouyer * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
16 1.2.2.2 bouyer * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
17 1.2.2.2 bouyer * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
18 1.2.2.2 bouyer * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,
19 1.2.2.2 bouyer * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
20 1.2.2.2 bouyer * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
21 1.2.2.2 bouyer * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
22 1.2.2.2 bouyer * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
23 1.2.2.2 bouyer * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
24 1.2.2.2 bouyer * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
25 1.2.2.2 bouyer * POSSIBILITY OF SUCH DAMAGE.
26 1.2.2.2 bouyer */
27 1.2.2.2 bouyer
28 1.2.2.2 bouyer #include "opt_wsdisplay_compat.h"
29 1.2.2.2 bouyer
30 1.2.2.2 bouyer #include <sys/types.h>
31 1.2.2.2 bouyer
32 1.2.2.2 bouyer #include <dev/wscons/wsksymdef.h>
33 1.2.2.2 bouyer #include <dev/wscons/wsksymvar.h>
34 1.2.2.2 bouyer
35 1.2.2.2 bouyer #include <hp300/dev/dnkbdmap.h>
36 1.2.2.2 bouyer
37 1.2.2.2 bouyer #ifdef WSDISPLAY_COMPAT_RAWKBD
38 1.2.2.2 bouyer
39 1.2.2.2 bouyer /*
40 1.2.2.2 bouyer * Translate Domain keycodes to US keyboard XT scancodes, for proper
41 1.2.2.2 bouyer * X11-over-wsmux operation.
42 1.2.2.2 bouyer */
43 1.2.2.3 bouyer const uint8_t dnkbd_raw[0x80] = {
44 1.2.2.2 bouyer 0x00, 0x00, 0x00, 0x00, 0x44, 0x3b, 0x3c, 0x3d,
45 1.2.2.2 bouyer 0x3e, 0x3f, 0x40, 0x41, 0x42, 0x43, 0x00, 0x00,
46 1.2.2.2 bouyer 0x00, 0x00, 0x46, 0x00, 0x00, 0x00, 0x01, 0x01,
47 1.2.2.2 bouyer 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09,
48 1.2.2.2 bouyer 0x0a, 0x0b, 0x0c, 0x0d, 0x29, 0x0e, 0x00, 0x00,
49 1.2.2.2 bouyer 0x00, 0x00, 0x00, 0x00, 0x0f, 0x10, 0x11, 0x12,
50 1.2.2.2 bouyer 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1a,
51 1.2.2.2 bouyer 0x1b, 0x00, 0xd3, 0x00, 0x47, 0x48, 0x49, 0x4e,
52 1.2.2.2 bouyer 0x00, 0xc8, 0x00, 0x1d, 0x00, 0x00, 0x1e, 0x1f,
53 1.2.2.2 bouyer 0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27,
54 1.2.2.2 bouyer 0x28, 0x00, 0x1c, 0x2b, 0x00, 0x4b, 0x4c, 0x4d,
55 1.2.2.2 bouyer 0x4a, 0xcb, 0x00, 0xcd, 0x00, 0x00, 0x2a, 0x00,
56 1.2.2.2 bouyer 0x2c, 0x2d, 0x2e, 0x2f, 0x30, 0x31, 0x32, 0x33,
57 1.2.2.2 bouyer 0x34, 0x35, 0x36, 0x00, 0x00, 0x00, 0x4f, 0x50,
58 1.2.2.2 bouyer 0x51, 0x00, 0x00, 0xd0, 0x00, 0x38, 0x39, 0xb8,
59 1.2.2.2 bouyer 0x00, 0x52, 0x00, 0x53, 0x9c, 0x00, 0x3a, 0x00
60 1.2.2.2 bouyer };
61 1.2.2.2 bouyer #endif
62 1.2.2.2 bouyer
63 1.2.2.2 bouyer #define KC(n) KS_KEYCODE(n)
64 1.2.2.2 bouyer
65 1.2.2.2 bouyer /*
66 1.2.2.2 bouyer * US English
67 1.2.2.2 bouyer */
68 1.2.2.2 bouyer
69 1.2.2.2 bouyer static const keysym_t dnkbd_keydesc_us[] = {
70 1.2.2.2 bouyer /* pos command normal shifted */
71 1.2.2.2 bouyer /* 01 Ins Mark */
72 1.2.2.2 bouyer /* 02 Line Del */
73 1.2.2.2 bouyer /* 03 Char Del */
74 1.2.2.2 bouyer KC(0x04), KS_f10,
75 1.2.2.2 bouyer KC(0x05), KS_f1,
76 1.2.2.2 bouyer KC(0x06), KS_f2,
77 1.2.2.2 bouyer KC(0x07), KS_f3,
78 1.2.2.2 bouyer KC(0x08), KS_f4,
79 1.2.2.2 bouyer KC(0x09), KS_f5,
80 1.2.2.2 bouyer KC(0x0a), KS_f6,
81 1.2.2.2 bouyer KC(0x0b), KS_f7,
82 1.2.2.2 bouyer KC(0x0c), KS_f8,
83 1.2.2.2 bouyer KC(0x0d), KS_f9,
84 1.2.2.2 bouyer /* 0e Again */
85 1.2.2.2 bouyer /* 0f Read */
86 1.2.2.2 bouyer /* 10 Save Edit */
87 1.2.2.2 bouyer /* 11 Abort Exit */
88 1.2.2.2 bouyer KC(0x12), KS_Hold_Screen,
89 1.2.2.2 bouyer /* 13 Cut Copy */
90 1.2.2.2 bouyer /* 14 Undo Paste */
91 1.2.2.2 bouyer /* 15 Move Grow */
92 1.2.2.2 bouyer KC(0x17), KS_Cmd_Debugger, KS_Escape,
93 1.2.2.2 bouyer KC(0x18), KS_1, KS_exclam,
94 1.2.2.2 bouyer KC(0x19), KS_2, KS_at,
95 1.2.2.2 bouyer KC(0x1a), KS_3, KS_numbersign,
96 1.2.2.2 bouyer KC(0x1b), KS_4, KS_dollar,
97 1.2.2.2 bouyer KC(0x1c), KS_5, KS_percent,
98 1.2.2.2 bouyer KC(0x1d), KS_6, KS_asciicircum,
99 1.2.2.2 bouyer KC(0x1e), KS_7, KS_ampersand,
100 1.2.2.2 bouyer KC(0x1f), KS_8, KS_asterisk,
101 1.2.2.2 bouyer KC(0x20), KS_9, KS_parenleft,
102 1.2.2.2 bouyer KC(0x21), KS_0, KS_parenright,
103 1.2.2.2 bouyer KC(0x22), KS_minus, KS_underscore,
104 1.2.2.2 bouyer KC(0x23), KS_equal, KS_plus,
105 1.2.2.2 bouyer KC(0x24), KS_grave, KS_asciitilde,
106 1.2.2.2 bouyer KC(0x25), KS_Cmd_ResetEmul, KS_Delete, /* backspace */
107 1.2.2.2 bouyer KC(0x27), KS_Home,
108 1.2.2.2 bouyer /* 28 Shell Cmd */
109 1.2.2.2 bouyer KC(0x29), KS_End,
110 1.2.2.2 bouyer KC(0x2c), KS_Tab,
111 1.2.2.2 bouyer KC(0x2d), KS_q,
112 1.2.2.2 bouyer KC(0x2e), KS_w,
113 1.2.2.2 bouyer KC(0x2f), KS_e,
114 1.2.2.2 bouyer KC(0x30), KS_r,
115 1.2.2.2 bouyer KC(0x31), KS_t,
116 1.2.2.2 bouyer KC(0x32), KS_y,
117 1.2.2.2 bouyer KC(0x33), KS_u,
118 1.2.2.2 bouyer KC(0x34), KS_i,
119 1.2.2.2 bouyer KC(0x35), KS_o,
120 1.2.2.2 bouyer KC(0x36), KS_p,
121 1.2.2.2 bouyer KC(0x37), KS_bracketleft, KS_braceleft,
122 1.2.2.2 bouyer KC(0x38), KS_bracketright,KS_braceright,
123 1.2.2.2 bouyer KC(0x3a), KS_Delete,
124 1.2.2.2 bouyer KC(0x3c), KS_KP_7,
125 1.2.2.2 bouyer KC(0x3d), KS_KP_8,
126 1.2.2.2 bouyer KC(0x3e), KS_KP_9,
127 1.2.2.2 bouyer KC(0x3f), KS_KP_Add,
128 1.2.2.2 bouyer /* 40 Left Box */
129 1.2.2.2 bouyer KC(0x41), KS_Up,
130 1.2.2.2 bouyer /* 42 Right Box */
131 1.2.2.2 bouyer KC(0x43), KS_Cmd1, KS_Control_L,
132 1.2.2.2 bouyer KC(0x46), KS_a,
133 1.2.2.2 bouyer KC(0x47), KS_s,
134 1.2.2.2 bouyer KC(0x48), KS_d,
135 1.2.2.2 bouyer KC(0x49), KS_f,
136 1.2.2.2 bouyer KC(0x4a), KS_g,
137 1.2.2.2 bouyer KC(0x4b), KS_h,
138 1.2.2.2 bouyer KC(0x4c), KS_j,
139 1.2.2.2 bouyer KC(0x4d), KS_k,
140 1.2.2.2 bouyer KC(0x4e), KS_l,
141 1.2.2.2 bouyer KC(0x4f), KS_semicolon, KS_colon,
142 1.2.2.2 bouyer KC(0x50), KS_apostrophe, KS_quotedbl,
143 1.2.2.2 bouyer KC(0x52), KS_Return,
144 1.2.2.2 bouyer KC(0x53), KS_backslash, KS_bar,
145 1.2.2.2 bouyer KC(0x55), KS_KP_4,
146 1.2.2.2 bouyer KC(0x56), KS_KP_5,
147 1.2.2.2 bouyer KC(0x57), KS_KP_6,
148 1.2.2.2 bouyer KC(0x58), KS_KP_Subtract,
149 1.2.2.2 bouyer KC(0x59), KS_Left,
150 1.2.2.2 bouyer /* 5a Next Wndw */
151 1.2.2.2 bouyer KC(0x5b), KS_Right,
152 1.2.2.2 bouyer /* 5d Rept */
153 1.2.2.2 bouyer KC(0x5e), KS_Shift_L,
154 1.2.2.2 bouyer KC(0x60), KS_z,
155 1.2.2.2 bouyer KC(0x61), KS_x,
156 1.2.2.2 bouyer KC(0x62), KS_c,
157 1.2.2.2 bouyer KC(0x63), KS_v,
158 1.2.2.2 bouyer KC(0x64), KS_b,
159 1.2.2.2 bouyer KC(0x65), KS_n,
160 1.2.2.2 bouyer KC(0x66), KS_m,
161 1.2.2.2 bouyer KC(0x67), KS_comma, KS_less,
162 1.2.2.2 bouyer KC(0x68), KS_period, KS_greater,
163 1.2.2.2 bouyer KC(0x69), KS_slash, KS_question,
164 1.2.2.2 bouyer KC(0x6a), KS_Shift_R,
165 1.2.2.2 bouyer /* 6c Pop */
166 1.2.2.2 bouyer KC(0x6e), KS_KP_1,
167 1.2.2.2 bouyer KC(0x6f), KS_KP_2,
168 1.2.2.2 bouyer KC(0x70), KS_KP_3,
169 1.2.2.2 bouyer /* 72 Top Box */
170 1.2.2.2 bouyer KC(0x73), KS_Down,
171 1.2.2.2 bouyer /* 74 Bottom Box */
172 1.2.2.2 bouyer KC(0x75), KS_Cmd2, KS_Alt_L,
173 1.2.2.2 bouyer KC(0x76), KS_space,
174 1.2.2.2 bouyer KC(0x77), KS_Cmd2, KS_Alt_R, KS_Multi_key,
175 1.2.2.2 bouyer KC(0x79), KS_KP_0,
176 1.2.2.2 bouyer KC(0x7b), KS_KP_Separator,
177 1.2.2.2 bouyer KC(0x7c), KS_KP_Enter,
178 1.2.2.2 bouyer KC(0x7e), KS_Caps_Lock
179 1.2.2.2 bouyer };
180 1.2.2.2 bouyer
181 1.2.2.2 bouyer /*
182 1.2.2.2 bouyer * German
183 1.2.2.2 bouyer */
184 1.2.2.2 bouyer
185 1.2.2.2 bouyer static const keysym_t dnkbd_keydesc_de[] = {
186 1.2.2.2 bouyer /* pos normal shifted altgr */
187 1.2.2.2 bouyer KC(0x17), KS_dead_circumflex, KS_dead_abovering,
188 1.2.2.2 bouyer KC(0x19), KS_2, KS_quotedbl,
189 1.2.2.2 bouyer KC(0x1a), KS_3, KS_at, KS_section,
190 1.2.2.2 bouyer KC(0x1d), KS_6, KS_ampersand,
191 1.2.2.2 bouyer KC(0x1e), KS_7, KS_slash,
192 1.2.2.2 bouyer KC(0x1f), KS_8, KS_parenleft,
193 1.2.2.2 bouyer KC(0x20), KS_9, KS_parenright,
194 1.2.2.2 bouyer KC(0x21), KS_0, KS_equal,
195 1.2.2.2 bouyer KC(0x22), KS_dead_tilde, KS_question, KS_ssharp,
196 1.2.2.2 bouyer KC(0x23), KS_dead_acute, KS_dead_grave,
197 1.2.2.2 bouyer KC(0x32), KS_z,
198 1.2.2.2 bouyer KC(0x37), KS_braceright, KS_bracketright,KS_udiaeresis,
199 1.2.2.2 bouyer KC(0x38), KS_plus, KS_asterisk,
200 1.2.2.2 bouyer KC(0x4f), KS_bar, KS_backslash, KS_odiaeresis,
201 1.2.2.2 bouyer KC(0x50), KS_braceleft, KS_bracketleft, KS_adiaeresis,
202 1.2.2.2 bouyer KC(0x51), KS_numbersign, KS_apostrophe,
203 1.2.2.2 bouyer KC(0x5f), KS_less, KS_greater,
204 1.2.2.2 bouyer KC(0x60), KS_y,
205 1.2.2.2 bouyer KC(0x67), KS_comma, KS_semicolon,
206 1.2.2.2 bouyer KC(0x68), KS_period, KS_colon,
207 1.2.2.2 bouyer KC(0x69), KS_minus, KS_underscore,
208 1.2.2.2 bouyer KC(0x77), KS_Mode_switch, KS_Multi_key
209 1.2.2.2 bouyer };
210 1.2.2.2 bouyer
211 1.2.2.2 bouyer static const keysym_t dnkbd_keydesc_de_nodead[] = {
212 1.2.2.2 bouyer KC(0x17), KS_asciicircum, KS_degree,
213 1.2.2.2 bouyer KC(0x22), KS_asciitilde, KS_question, KS_ssharp,
214 1.2.2.2 bouyer KC(0x23), KS_apostrophe, KS_grave
215 1.2.2.2 bouyer };
216 1.2.2.2 bouyer
217 1.2.2.2 bouyer /*
218 1.2.2.2 bouyer * Norwegian / Danish
219 1.2.2.2 bouyer */
220 1.2.2.2 bouyer
221 1.2.2.2 bouyer static const keysym_t dnkbd_keydesc_dk[] = {
222 1.2.2.2 bouyer /* pos normal shifted altgr */
223 1.2.2.2 bouyer KC(0x17), KS_underscore,
224 1.2.2.2 bouyer KC(0x19), KS_2, KS_quotedbl,
225 1.2.2.2 bouyer KC(0x1d), KS_6, KS_ampersand,
226 1.2.2.2 bouyer KC(0x1e), KS_7, KS_slash,
227 1.2.2.2 bouyer KC(0x1f), KS_8, KS_parenleft,
228 1.2.2.2 bouyer KC(0x20), KS_9, KS_parenright,
229 1.2.2.2 bouyer KC(0x21), KS_0, KS_equal,
230 1.2.2.2 bouyer KC(0x22), KS_plus, KS_question,
231 1.2.2.2 bouyer KC(0x23), KS_dead_grave, KS_at,
232 1.2.2.2 bouyer KC(0x37), KS_braceright, KS_bracketright,KS_aring,
233 1.2.2.2 bouyer KC(0x38), KS_dead_tilde, KS_dead_circumflex,KS_dead_diaeresis,
234 1.2.2.2 bouyer KC(0x4f), KS_bar, KS_backslash, KS_oslash,
235 1.2.2.2 bouyer KC(0x50), KS_braceleft, KS_bracketleft, KS_ae,
236 1.2.2.2 bouyer KC(0x51), KS_dead_acute, KS_asterisk,
237 1.2.2.2 bouyer KC(0x5f), KS_less, KS_greater,
238 1.2.2.2 bouyer KC(0x67), KS_comma, KS_semicolon,
239 1.2.2.2 bouyer KC(0x68), KS_period, KS_colon,
240 1.2.2.2 bouyer KC(0x69), KS_minus, KS_underscore,
241 1.2.2.2 bouyer KC(0x77), KS_Mode_switch, KS_Multi_key
242 1.2.2.2 bouyer };
243 1.2.2.2 bouyer
244 1.2.2.2 bouyer static const keysym_t dnkbd_keydesc_dk_nodead[] = {
245 1.2.2.2 bouyer /* pos normal shifted altgr */
246 1.2.2.2 bouyer KC(0x23), KS_grave, KS_at,
247 1.2.2.2 bouyer KC(0x38), KS_asciitilde, KS_asciicircum, KS_diaeresis,
248 1.2.2.2 bouyer KC(0x51), KS_apostrophe, KS_asterisk,
249 1.2.2.2 bouyer };
250 1.2.2.2 bouyer
251 1.2.2.2 bouyer /*
252 1.2.2.2 bouyer * French
253 1.2.2.2 bouyer */
254 1.2.2.2 bouyer
255 1.2.2.2 bouyer static const keysym_t dnkbd_keydesc_fr[] = {
256 1.2.2.2 bouyer /* pos normal shifted altgr */
257 1.2.2.2 bouyer KC(0x17), KS_bracketleft, KS_degree,
258 1.2.2.2 bouyer KC(0x18), KS_ampersand, KS_1,
259 1.2.2.2 bouyer KC(0x19), KS_braceleft, KS_2, KS_eacute,
260 1.2.2.2 bouyer KC(0x1a), KS_quotedbl, KS_3,
261 1.2.2.2 bouyer KC(0x1b), KS_apostrophe, KS_4,
262 1.2.2.2 bouyer KC(0x1c), KS_parenleft, KS_5,
263 1.2.2.2 bouyer KC(0x1d), KS_bracketright,KS_6, KS_section,
264 1.2.2.2 bouyer KC(0x1e), KS_braceright, KS_7, KS_egrave,
265 1.2.2.2 bouyer KC(0x1f), KS_exclam, KS_8,
266 1.2.2.2 bouyer KC(0x20), KS_backslash, KS_9, KS_ccedilla,
267 1.2.2.2 bouyer KC(0x21), KS_at, KS_0, KS_agrave,
268 1.2.2.2 bouyer KC(0x22), KS_parenright, KS_degree,
269 1.2.2.2 bouyer KC(0x23), KS_minus, KS_underscore,
270 1.2.2.2 bouyer KC(0x2d), KS_a,
271 1.2.2.2 bouyer KC(0x2e), KS_z,
272 1.2.2.2 bouyer KC(0x37), KS_dead_circumflex, KS_asciitilde, KS_dead_diaeresis,
273 1.2.2.2 bouyer KC(0x38), KS_dollar, KS_asterisk,
274 1.2.2.2 bouyer KC(0x46), KS_q,
275 1.2.2.2 bouyer KC(0x4f), KS_m,
276 1.2.2.2 bouyer KC(0x50), KS_bar, KS_percent, KS_ugrave,
277 1.2.2.2 bouyer KC(0x51), KS_grave, KS_numbersign,
278 1.2.2.2 bouyer KC(0x5f), KS_less, KS_greater,
279 1.2.2.2 bouyer KC(0x60), KS_w,
280 1.2.2.2 bouyer KC(0x66), KS_comma, KS_question,
281 1.2.2.2 bouyer KC(0x67), KS_semicolon, KS_period,
282 1.2.2.2 bouyer KC(0x68), KS_colon, KS_slash,
283 1.2.2.2 bouyer KC(0x69), KS_equal, KS_plus,
284 1.2.2.2 bouyer KC(0x77), KS_Mode_switch, KS_Multi_key
285 1.2.2.2 bouyer };
286 1.2.2.2 bouyer
287 1.2.2.2 bouyer /*
288 1.2.2.2 bouyer * Japanese (and basis for international layouts)
289 1.2.2.2 bouyer *
290 1.2.2.2 bouyer * Apparently this layout lacks all japanese keys (Zenkaku/Hankaku,
291 1.2.2.2 bouyer * Hiragana/Katakana, Henkan and Muhenkan). Makes one wonder about
292 1.2.2.2 bouyer * its usefulness.
293 1.2.2.2 bouyer */
294 1.2.2.2 bouyer
295 1.2.2.2 bouyer static const keysym_t dnkbd_keydesc_jp[] = {
296 1.2.2.2 bouyer /* pos cmd normal shifted */
297 1.2.2.2 bouyer KC(0x16), KS_Cmd_Debugger, KS_Escape,
298 1.2.2.2 bouyer KC(0x17), KS_grave, KS_asciitilde,
299 1.2.2.2 bouyer KC(0x24), KS_Cmd_ResetEmul, KS_Delete, /* backspace */
300 1.2.2.2 bouyer KC(0x25), KS_Delete,
301 1.2.2.2 bouyer /* 2b Rept */
302 1.2.2.2 bouyer KC(0x3b), KS_KP_Add,
303 1.2.2.2 bouyer KC(0x3f), KS_parenleft, /* KS_KP_parenleft */
304 1.2.2.2 bouyer KC(0x51), KS_backslash, KS_bar,
305 1.2.2.2 bouyer KC(0x54), KS_KP_Subtract,
306 1.2.2.2 bouyer KC(0x58), KS_parenright, /* KS_KP_parenright */
307 1.2.2.2 bouyer KC(0x5f), KS_less, KS_greater,
308 1.2.2.2 bouyer KC(0x6d), KS_KP_Multiply,
309 1.2.2.2 bouyer KC(0x78), KS_KP_Divide,
310 1.2.2.2 bouyer };
311 1.2.2.2 bouyer
312 1.2.2.2 bouyer /*
313 1.2.2.2 bouyer * Swiss (relative to the German layout)
314 1.2.2.2 bouyer */
315 1.2.2.2 bouyer
316 1.2.2.2 bouyer static const keysym_t dnkbd_keydesc_sg[] = {
317 1.2.2.2 bouyer /* pos normal shifted altgr */
318 1.2.2.2 bouyer KC(0x17), KS_at, KS_exclam, KS_section,
319 1.2.2.2 bouyer KC(0x18), KS_1, KS_plus,
320 1.2.2.2 bouyer KC(0x1a), KS_3, KS_asterisk,
321 1.2.2.2 bouyer KC(0x1b), KS_4, KS_backslash, KS_ccedilla,
322 1.2.2.2 bouyer KC(0x22), KS_apostrophe, KS_question,
323 1.2.2.2 bouyer KC(0x23), KS_dead_circumflex,KS_dead_grave,
324 1.2.2.2 bouyer KC(0x37), KS_braceright, KS_dead_tilde, KS_udiaeresis, KS_egrave,
325 1.2.2.2 bouyer KC(0x38), KS_dead_diaeresis,KS_dead_acute,
326 1.2.2.2 bouyer KC(0x4f), KS_bar, KS_bracketleft, KS_odiaeresis, KS_eacute,
327 1.2.2.2 bouyer KC(0x50), KS_braceleft, KS_bracketright,KS_adiaeresis, KS_agrave,
328 1.2.2.2 bouyer KC(0x51), KS_dollar, KS_numbersign, KS_sterling
329 1.2.2.2 bouyer };
330 1.2.2.2 bouyer
331 1.2.2.2 bouyer static const keysym_t dnkbd_keydesc_sg_nodead[] = {
332 1.2.2.2 bouyer /* pos normal shifted altgr */
333 1.2.2.2 bouyer KC(0x23), KS_asciicircum, KS_grave,
334 1.2.2.2 bouyer KC(0x37), KS_braceright, KS_asciitilde, KS_udiaeresis, KS_egrave,
335 1.2.2.2 bouyer KC(0x38), KS_diaeresis, KS_apostrophe
336 1.2.2.2 bouyer };
337 1.2.2.2 bouyer
338 1.2.2.2 bouyer /*
339 1.2.2.2 bouyer * Swedish / Finnish (relative to the Norwegian / Danish layout)
340 1.2.2.2 bouyer */
341 1.2.2.2 bouyer
342 1.2.2.2 bouyer static const keysym_t dnkbd_keydesc_sv[] = {
343 1.2.2.2 bouyer /* pos normal shifted altgr */
344 1.2.2.2 bouyer KC(0x1b), KS_4, KS_dollar, KS_currency,
345 1.2.2.2 bouyer KC(0x23), KS_dead_grave, KS_at, KS_eacute,
346 1.2.2.2 bouyer KC(0x38), KS_dead_tilde, KS_dead_circumflex,KS_udiaeresis,
347 1.2.2.2 bouyer KC(0x4f), KS_bar, KS_backslash, KS_odiaeresis,
348 1.2.2.2 bouyer KC(0x50), KS_braceleft, KS_bracketleft, KS_adiaeresis
349 1.2.2.2 bouyer };
350 1.2.2.2 bouyer
351 1.2.2.2 bouyer static const keysym_t dnkbd_keydesc_sv_nodead[] = {
352 1.2.2.2 bouyer /* pos normal shifted altgr */
353 1.2.2.2 bouyer KC(0x23), KS_grave, KS_at, KS_eacute,
354 1.2.2.2 bouyer KC(0x38), KS_asciitilde, KS_asciicircum, KS_udiaeresis,
355 1.2.2.2 bouyer KC(0x51), KS_apostrophe, KS_asterisk,
356 1.2.2.2 bouyer };
357 1.2.2.2 bouyer
358 1.2.2.2 bouyer /*
359 1.2.2.2 bouyer * UK English
360 1.2.2.2 bouyer */
361 1.2.2.2 bouyer
362 1.2.2.2 bouyer static const keysym_t dnkbd_keydesc_uk[] = {
363 1.2.2.2 bouyer /* pos normal shifted */
364 1.2.2.2 bouyer KC(0x17), KS_underscore,
365 1.2.2.2 bouyer KC(0x19), KS_2, KS_quotedbl,
366 1.2.2.2 bouyer KC(0x1d), KS_6, KS_ampersand,
367 1.2.2.2 bouyer KC(0x1e), KS_7, KS_apostrophe,
368 1.2.2.2 bouyer KC(0x1f), KS_8, KS_parenleft,
369 1.2.2.2 bouyer KC(0x20), KS_9, KS_parenright,
370 1.2.2.2 bouyer KC(0x21), KS_0, KS_underscore,
371 1.2.2.2 bouyer KC(0x22), KS_minus, KS_equal,
372 1.2.2.2 bouyer KC(0x23), KS_asciicircum, KS_asciitilde,
373 1.2.2.2 bouyer KC(0x37), KS_at, KS_grave,
374 1.2.2.2 bouyer KC(0x38), KS_bracketleft, KS_braceleft,
375 1.2.2.2 bouyer KC(0x4f), KS_semicolon, KS_plus,
376 1.2.2.2 bouyer KC(0x50), KS_colon, KS_asterisk,
377 1.2.2.2 bouyer KC(0x51), KS_bracketright,KS_braceright,
378 1.2.2.2 bouyer KC(0x5f), KS_backslash, KS_bar
379 1.2.2.2 bouyer };
380 1.2.2.2 bouyer
381 1.2.2.2 bouyer #define KBD_MAP(name, base, map) \
382 1.2.2.2 bouyer { name, base, sizeof(map) / sizeof(keysym_t), map }
383 1.2.2.2 bouyer
384 1.2.2.2 bouyer const struct wscons_keydesc dnkbd_keydesctab[] = {
385 1.2.2.2 bouyer KBD_MAP(KB_US, 0, dnkbd_keydesc_us),
386 1.2.2.2 bouyer KBD_MAP(KB_DE, KB_JP, dnkbd_keydesc_de),
387 1.2.2.2 bouyer KBD_MAP(KB_DE | KB_NODEAD, KB_DE, dnkbd_keydesc_de_nodead),
388 1.2.2.2 bouyer KBD_MAP(KB_DK, KB_JP, dnkbd_keydesc_dk),
389 1.2.2.2 bouyer KBD_MAP(KB_DK | KB_NODEAD, KB_DK, dnkbd_keydesc_dk_nodead),
390 1.2.2.2 bouyer KBD_MAP(KB_FR, KB_JP, dnkbd_keydesc_fr),
391 1.2.2.2 bouyer KBD_MAP(KB_JP, KB_US, dnkbd_keydesc_jp),
392 1.2.2.2 bouyer KBD_MAP(KB_SG, KB_DE, dnkbd_keydesc_sg),
393 1.2.2.2 bouyer KBD_MAP(KB_SG | KB_NODEAD, KB_SG, dnkbd_keydesc_sg_nodead),
394 1.2.2.2 bouyer KBD_MAP(KB_SV, KB_DK, dnkbd_keydesc_sv),
395 1.2.2.2 bouyer KBD_MAP(KB_SV | KB_NODEAD, KB_SV, dnkbd_keydesc_sv_nodead),
396 1.2.2.2 bouyer KBD_MAP(KB_UK, KB_JP, dnkbd_keydesc_uk),
397 1.2.2.2 bouyer { 0, 0, 0, 0 }
398 1.2.2.2 bouyer };
399