FabGL
ESP32 Display Controller and Graphics Library
kbdlayouts.cpp
1/*
2 Created by Fabrizio Di Vittorio (fdivitto2013@gmail.com) - <http://www.fabgl.com>
3 Copyright (c) 2019-2022 Fabrizio Di Vittorio.
4 All rights reserved.
5
6
7* Please contact fdivitto2013@gmail.com if you need a commercial license.
8
9
10* This library and related software is available under GPL v3.
11
12 FabGL is free software: you can redistribute it and/or modify
13 it under the terms of the GNU General Public License as published by
14 the Free Software Foundation, either version 3 of the License, or
15 (at your option) any later version.
16
17 FabGL is distributed in the hope that it will be useful,
18 but WITHOUT ANY WARRANTY; without even the implied warranty of
19 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 GNU General Public License for more details.
21
22 You should have received a copy of the GNU General Public License
23 along with FabGL. If not, see <http://www.gnu.org/licenses/>.
24 */
25
26
27 #include "kbdlayouts.h"
28
29
30
31
32 namespace fabgl {
33
34
35
36
37
38/**************************************************************************************/
39/* US LAYOUT */
40/**************************************************************************************/
41const KeyboardLayout USLayout {
42 // name
43 "US",
44
45 // desc
46 "US English",
47
48 // inherited layout
49 nullptr,
50
51 // single byte scancodes
52 {
53 { 0x76, VK_ESCAPE },
54 { 0x05, VK_F1 },
55 { 0x06, VK_F2 },
56 { 0x04, VK_F3 },
57 { 0x0C, VK_F4 },
58 { 0x03, VK_F5 },
59 { 0x0B, VK_F6 },
60 { 0x83, VK_F7 },
61 { 0x0A, VK_F8 },
62 { 0x01, VK_F9 },
63 { 0x09, VK_F10 },
64 { 0x78, VK_F11 },
65 { 0x07, VK_F12 },
66 { 0x16, VK_1 },
67 { 0x1E, VK_2 },
68 { 0x26, VK_3 },
69 { 0x25, VK_4 },
70 { 0x2E, VK_5 },
71 { 0x36, VK_6 },
72 { 0x3D, VK_7 },
73 { 0x3E, VK_8 },
74 { 0x46, VK_9 },
75 { 0x45, VK_0 },
76 { 0x15, VK_q },
77 { 0x1D, VK_w },
78 { 0x24, VK_e },
79 { 0x2D, VK_r },
80 { 0x2C, VK_t },
81 { 0x35, VK_y },
82 { 0x3C, VK_u },
83 { 0x43, VK_i },
84 { 0x44, VK_o },
85 { 0x4D, VK_p },
86 { 0x1C, VK_a },
87 { 0x1b, VK_s },
88 { 0x23, VK_d },
89 { 0x2b, VK_f },
90 { 0x34, VK_g },
91 { 0x33, VK_h },
92 { 0x3B, VK_j },
93 { 0x42, VK_k },
94 { 0x4B, VK_l },
95 { 0x1A, VK_z },
96 { 0x22, VK_x },
97 { 0x21, VK_c },
98 { 0x2A, VK_v },
99 { 0x32, VK_b },
100 { 0x31, VK_n },
101 { 0x3A, VK_m },
102 { 0x0E, VK_GRAVEACCENT },
103 { 0x4E, VK_MINUS },
104 { 0x55, VK_EQUALS },
105 { 0x54, VK_LEFTBRACKET },
106 { 0x5B, VK_RIGHTBRACKET },
107 { 0x5D, VK_BACKSLASH },
108 { 0x4C, VK_SEMICOLON },
109 { 0x52, VK_QUOTE },
110 { 0x41, VK_COMMA },
111 { 0x49, VK_PERIOD },
112 { 0x4A, VK_SLASH },
113 { 0x70, VK_KP_INSERT },
114 { 0x69, VK_KP_END },
115 { 0x72, VK_KP_DOWN },
116 { 0x7A, VK_KP_PAGEDOWN },
117 { 0x6B, VK_KP_LEFT },
118 { 0x73, VK_KP_CENTER }, // "5" in the keypad
119 { 0x74, VK_KP_RIGHT },
120 { 0x6C, VK_KP_HOME },
121 { 0x75, VK_KP_UP },
122 { 0x7D, VK_KP_PAGEUP },
123 { 0x71, VK_KP_DELETE },
124 { 0x7C, VK_KP_MULTIPLY },
125 { 0x79, VK_KP_PLUS },
126 { 0x7B, VK_KP_MINUS },
127 { 0x66, VK_BACKSPACE },
128 { 0x0D, VK_TAB },
129 { 0x5A, VK_RETURN },
130 { 0x77, VK_NUMLOCK },
131 { 0x7E, VK_SCROLLLOCK },
132 { 0x58, VK_CAPSLOCK },
133 { 0x12, VK_LSHIFT },
134 { 0x59, VK_RSHIFT },
135 { 0x14, VK_LCTRL },
136 { 0x11, VK_LALT },
137 { 0x29, VK_SPACE },
138 { 0x84, VK_SYSREQ }, // ALT + PRINTSCREEN directly translated by the keyboard
139 },
140
141 // extended scancodes (0xE0..)
142 {
143 { 0x14, VK_RCTRL },
144 { 0x11, VK_RALT },
145 { 0x1F, VK_LGUI },
146 { 0x27, VK_RGUI },
147 { 0x2F, VK_APPLICATION },
148 { 0x70, VK_INSERT },
149 { 0x71, VK_DELETE },
150 { 0x4A, VK_KP_DIVIDE },
151 { 0x5A, VK_KP_ENTER },
152 { 0x7D, VK_PAGEUP },
153 { 0x7A, VK_PAGEDOWN },
154 { 0x6C, VK_HOME },
155 { 0x69, VK_END },
156 { 0x75, VK_UP },
157 { 0x72, VK_DOWN },
158 { 0x6B, VK_LEFT },
159 { 0x74, VK_RIGHT },
160 { 0x7C, VK_PRINTSCREEN },
161 // note1: pressing CTRL + PAUSE will generate "E0 7E" instead of normal Pause sequence. Here is translated to VK_BREAK.
162 // note2: pressing CTRL + PAUSE generates both keydown and keyup at the same time (hence the sequence E0 7E E0 F0 7E)
163 { 0x7E, VK_BREAK },
164 // these codes are discarded. They are a sort of extended left and right shifts.
165 // They are prefixed/postfixed on some special keys (insert, cursor,...) in combination with SHIFT or NUM LOCK, and even in unshifted PRINTSCREEN
166 { 0x12, VK_NONE },
167 { 0x59, VK_NONE },
168 },
169
170 // virtual keys generated by other virtual keys combinations
171 // in_key, { CTRL, LALT, RALT, SHIFT }, out_key
172 {
173 { VK_1, { 0, 0, 0, 1 }, VK_EXCLAIM }, // SHIFT "1" = "!"
174 { VK_2, { 0, 0, 0, 1 }, VK_AT }, // SHIFT "2" = "@"
175 { VK_3, { 0, 0, 0, 1 }, VK_HASH }, // SHIFT "3" = "#"
176 { VK_4, { 0, 0, 0, 1 }, VK_DOLLAR }, // SHIFT "4" = "$"
177 { VK_5, { 0, 0, 0, 1 }, VK_PERCENT }, // SHIFT "5" = "%"
178 { VK_6, { 0, 0, 0, 1 }, VK_CARET }, // SHIFT "6" = "^"
179 { VK_7, { 0, 0, 0, 1 }, VK_AMPERSAND }, // SHIFT "7" = "&"
180 { VK_8, { 0, 0, 0, 1 }, VK_ASTERISK }, // SHIFT "8" = "*"
181 { VK_9, { 0, 0, 0, 1 }, VK_LEFTPAREN }, // SHIFT "9" = "("
182 { VK_0, { 0, 0, 0, 1 }, VK_RIGHTPAREN }, // SHIFT "0" = ")"
183
184 { VK_GRAVEACCENT, { 0, 0, 0, 1 }, VK_TILDE }, // SHIFT "`" = "~"
185 { VK_MINUS, { 0, 0, 0, 1 }, VK_UNDERSCORE }, // SHIFT "-" = "_"
186 { VK_EQUALS, { 0, 0, 0, 1 }, VK_PLUS }, // SHIFT "=" = "+"
187 { VK_LEFTBRACKET, { 0, 0, 0, 1 }, VK_LEFTBRACE }, // SHIFT "[" = "{"
188 { VK_RIGHTBRACKET, { 0, 0, 0, 1 }, VK_RIGHTBRACE }, // SHIFT "]" = "}"
189 { VK_BACKSLASH, { 0, 0, 0, 1 }, VK_VERTICALBAR }, // SHIFT "\" = "|"
190 { VK_SEMICOLON, { 0, 0, 0, 1 }, VK_COLON }, // SHIFT ";" = ":"
191 { VK_QUOTE, { 0, 0, 0, 1 }, VK_QUOTEDBL }, // SHIFT "'" = """
192 { VK_COMMA, { 0, 0, 0, 1 }, VK_LESS }, // SHIFT "," = "<"
193 { VK_PERIOD, { 0, 0, 0, 1 }, VK_GREATER }, // SHIFT "." = ">"
194 { VK_SLASH, { 0, 0, 0, 1 }, VK_QUESTION }, // SHIFT "/" = "?"
195
196 // SHIFT "a".."z" = "A".."Z"
197 { VK_a, { 0, 0, 0, 1 }, VK_A },
198 { VK_b, { 0, 0, 0, 1 }, VK_B },
199 { VK_c, { 0, 0, 0, 1 }, VK_C },
200 { VK_d, { 0, 0, 0, 1 }, VK_D },
201 { VK_e, { 0, 0, 0, 1 }, VK_E },
202 { VK_f, { 0, 0, 0, 1 }, VK_F },
203 { VK_g, { 0, 0, 0, 1 }, VK_G },
204 { VK_h, { 0, 0, 0, 1 }, VK_H },
205 { VK_i, { 0, 0, 0, 1 }, VK_I },
206 { VK_j, { 0, 0, 0, 1 }, VK_J },
207 { VK_k, { 0, 0, 0, 1 }, VK_K },
208 { VK_l, { 0, 0, 0, 1 }, VK_L },
209 { VK_m, { 0, 0, 0, 1 }, VK_M },
210 { VK_n, { 0, 0, 0, 1 }, VK_N },
211 { VK_o, { 0, 0, 0, 1 }, VK_O },
212 { VK_p, { 0, 0, 0, 1 }, VK_P },
213 { VK_q, { 0, 0, 0, 1 }, VK_Q },
214 { VK_r, { 0, 0, 0, 1 }, VK_R },
215 { VK_s, { 0, 0, 0, 1 }, VK_S },
216 { VK_t, { 0, 0, 0, 1 }, VK_T },
217 { VK_u, { 0, 0, 0, 1 }, VK_U },
218 { VK_v, { 0, 0, 0, 1 }, VK_V },
219 { VK_w, { 0, 0, 0, 1 }, VK_W },
220 { VK_x, { 0, 0, 0, 1 }, VK_X },
221 { VK_y, { 0, 0, 0, 1 }, VK_Y },
222 { VK_z, { 0, 0, 0, 1 }, VK_Z },
223
224 // SHIFT "A".."Z" = "a".."z"
225 { VK_A, { 0, 0, 0, 1 }, VK_a },
226 { VK_B, { 0, 0, 0, 1 }, VK_b },
227 { VK_C, { 0, 0, 0, 1 }, VK_c },
228 { VK_D, { 0, 0, 0, 1 }, VK_d },
229 { VK_E, { 0, 0, 0, 1 }, VK_e },
230 { VK_F, { 0, 0, 0, 1 }, VK_f },
231 { VK_G, { 0, 0, 0, 1 }, VK_g },
232 { VK_H, { 0, 0, 0, 1 }, VK_h },
233 { VK_I, { 0, 0, 0, 1 }, VK_i },
234 { VK_J, { 0, 0, 0, 1 }, VK_j },
235 { VK_K, { 0, 0, 0, 1 }, VK_k },
236 { VK_L, { 0, 0, 0, 1 }, VK_l },
237 { VK_M, { 0, 0, 0, 1 }, VK_m },
238 { VK_N, { 0, 0, 0, 1 }, VK_n },
239 { VK_O, { 0, 0, 0, 1 }, VK_o },
240 { VK_P, { 0, 0, 0, 1 }, VK_p },
241 { VK_Q, { 0, 0, 0, 1 }, VK_q },
242 { VK_R, { 0, 0, 0, 1 }, VK_r },
243 { VK_S, { 0, 0, 0, 1 }, VK_s },
244 { VK_T, { 0, 0, 0, 1 }, VK_t },
245 { VK_U, { 0, 0, 0, 1 }, VK_u },
246 { VK_V, { 0, 0, 0, 1 }, VK_v },
247 { VK_W, { 0, 0, 0, 1 }, VK_w },
248 { VK_X, { 0, 0, 0, 1 }, VK_x },
249 { VK_Y, { 0, 0, 0, 1 }, VK_y },
250 { VK_Z, { 0, 0, 0, 1 }, VK_z },
251
252 },
253
254 // deadkeys
255 {
256 },
257
258 // deadkeys translation
259 {
260 },
261};
262
263
264/**************************************************************************************/
265/* UK LAYOUT */
266/**************************************************************************************/
267const KeyboardLayout UKLayout {
268 // name
269 "UK",
270
271 // desc
272 "UK British",
273
274 // inherited layout
275 &USLayout,
276
277 // single byte scancodes
278 {
279 { 0x5D, VK_HASH },
280 { 0x61, VK_BACKSLASH },
281 },
282
283 // extended scancodes (0xE0..)
284 {
285 },
286
287 // virtual keys generated by other virtual keys combinations
288 // in_key, { CTRL, LALT, RALT, SHIFT }, out_key
289 {
290 { VK_GRAVEACCENT, { 0, 0, 0, 1 }, VK_NEGATION }, // SHIFT "`" = "¬"
291 { VK_2, { 0, 0, 0, 1 }, VK_QUOTEDBL }, // SHIFT "2" = """
292 { VK_3, { 0, 0, 0, 1 }, VK_POUND }, // SHIFT "3" = "£"
293 { VK_QUOTE, { 0, 0, 0, 1 }, VK_AT }, // SHIFT "'" = "@"
294 { VK_HASH, { 0, 0, 0, 1 }, VK_TILDE }, // SHIFT "#" = "~"
295 { VK_BACKSLASH, { 0, 0, 0, 1 }, VK_VERTICALBAR }, // SHIFT "\" = "|"
296 },
297
298 // deadkeys
299 {
300 },
301
302 // deadkeys translation
303 {
304 },
305};
306
307
308/**************************************************************************************/
309/* GERMAN LAYOUT */
310/**************************************************************************************/
311const KeyboardLayout GermanLayout {
312 // name
313 "DE",
314
315 // desc
316 "German",
317
318 // inherited layout
319 &USLayout,
320
321 // single byte scancodes
322 {
323 { 0x0E, VK_CARET },
324 { 0x4E, VK_ESZETT },
325 { 0x55, VK_ACUTEACCENT },
326 { 0x54, VK_UMLAUT_u },
327 { 0x5B, VK_PLUS },
328 { 0x4C, VK_UMLAUT_o },
329 { 0x52, VK_UMLAUT_a },
330 { 0x5D, VK_HASH },
331 { 0x61, VK_LESS },
332 { 0x4A, VK_MINUS },
333 { 0x35, VK_z },
334 { 0x1A, VK_y },
335 },
336
337 // extended scancodes (0xE0..)
338 {
339 },
340
341 // virtual keys generated by other virtual keys combinations
342 // in_key, { CTRL, LALT, RALT, SHIFT }, out_key
343 {
344 { VK_CARET, { 0, 0, 0, 1 }, VK_DEGREE }, // SHIFT "^" = "°"
345 { VK_2, { 0, 0, 0, 1 }, VK_QUOTEDBL }, // SHIFT "2" = """
346 { VK_3, { 0, 0, 0, 1 }, VK_SECTION }, // SHIFT "3" = "§"
347 { VK_6, { 0, 0, 0, 1 }, VK_AMPERSAND }, // SHIFT "6" = "&"
348 { VK_7, { 0, 0, 0, 1 }, VK_SLASH }, // SHIFT "7" = "/"
349 { VK_8, { 0, 0, 0, 1 }, VK_LEFTPAREN }, // SHIFT "8" = "("
350 { VK_9, { 0, 0, 0, 1 }, VK_RIGHTPAREN }, // SHIFT "9" = ")"
351 { VK_0, { 0, 0, 0, 1 }, VK_EQUALS }, // SHIFT "0" = "="
352 { VK_ESZETT, { 0, 0, 0, 1 }, VK_QUESTION }, // SHIFT "ß" = "?"
353 { VK_ACUTEACCENT, { 0, 0, 0, 1 }, VK_GRAVEACCENT }, // SHIFT "´" = "`"
354 { VK_PLUS, { 0, 0, 0, 1 }, VK_ASTERISK }, // SHIFT "+" = "*"
355 { VK_HASH, { 0, 0, 0, 1 }, VK_QUOTE }, // SHIFT "#" = "'"
356 { VK_LESS, { 0, 0, 0, 1 }, VK_GREATER }, // SHIFT "<" = ">"
357 { VK_COMMA, { 0, 0, 0, 1 }, VK_SEMICOLON }, // SHIFT "," = ";"
358 { VK_PERIOD, { 0, 0, 0, 1 }, VK_COLON }, // SHIFT "." = ":"
359 { VK_MINUS, { 0, 0, 0, 1 }, VK_UNDERSCORE }, // SHIFT "-" = "_"
360 { VK_7, { 0, 0, 1, 0 }, VK_LEFTBRACE }, // ALT "7" = "{"
361 { VK_8, { 0, 0, 1, 0 }, VK_LEFTBRACKET }, // ALT "8" = "["
362 { VK_9, { 0, 0, 1, 0 }, VK_RIGHTBRACKET }, // ALT "9" = "]"
363 { VK_0, { 0, 0, 1, 0 }, VK_RIGHTBRACE }, // ALT "0" = "}"
364 { VK_ESZETT, { 0, 0, 1, 0 }, VK_BACKSLASH }, // ALT "ß" = "\"
365 { VK_q, { 0, 0, 1, 0 }, VK_AT }, // ALT "q" = "@"
366 { VK_e, { 0, 0, 1, 0 }, VK_EURO }, // ALT "e" = "€"
367 { VK_PLUS, { 0, 0, 1, 0 }, VK_TILDE }, // ALT "+" = "~"
368 { VK_LESS, { 0, 0, 1, 0 }, VK_VERTICALBAR }, // ALT "<" = "|"
369 },
370
371 // deadkeys
372 {
373 },
374
375 // deadkeys translation
376 {
377 },
378};
379
380
381/**************************************************************************************/
382/* ITALIAN LAYOUT */
383/**************************************************************************************/
384const KeyboardLayout ItalianLayout {
385 // name
386 "IT",
387
388 // desc
389 "Italian",
390
391 // inherited layout
392 &USLayout,
393
394 // single byte scancodes
395 {
396 { 0x0E, VK_BACKSLASH },
397 { 0x4E, VK_QUOTE },
398 { 0x55, VK_GRAVE_i },
399 { 0x54, VK_GRAVE_e },
400 { 0x5B, VK_PLUS },
401 { 0x4C, VK_GRAVE_o },
402 { 0x52, VK_GRAVE_a },
403 { 0x5D, VK_GRAVE_u },
404 { 0x61, VK_LESS },
405 { 0x4A, VK_MINUS },
406 },
407
408 // extended scancodes (0xE0..)
409 {
410 },
411
412 // virtual keys generated by other virtual keys combinations
413 // in_key, { CTRL, LALT, RALT, SHIFT }, out_key
414 {
415 { VK_BACKSLASH, { 0, 0, 0, 1 }, VK_VERTICALBAR }, // SHIFT "\" = "|"
416 { VK_2, { 0, 0, 0, 1 }, VK_QUOTEDBL }, // SHIFT "2" = """
417 { VK_3, { 0, 0, 0, 1 }, VK_POUND }, // SHIFT "3" = "£"
418 { VK_6, { 0, 0, 0, 1 }, VK_AMPERSAND }, // SHIFT "6" = "&"
419 { VK_7, { 0, 0, 0, 1 }, VK_SLASH }, // SHIFT "7" = "/"
420 { VK_8, { 0, 0, 0, 1 }, VK_LEFTPAREN }, // SHIFT "8" = "("
421 { VK_9, { 0, 0, 0, 1 }, VK_RIGHTPAREN }, // SHIFT "9" = ")"
422 { VK_0, { 0, 0, 0, 1 }, VK_EQUALS }, // SHIFT "0" = "="
423 { VK_QUOTE, { 0, 0, 0, 1 }, VK_QUESTION }, // SHIFT "'" = "?"
424 { VK_GRAVE_i, { 0, 0, 0, 1 }, VK_CARET }, // SHIFT "ì" = "^"
425 { VK_GRAVE_e, { 0, 0, 0, 1 }, VK_ACUTE_e }, // SHIFT "è" = "é"
426 { VK_PLUS, { 0, 0, 0, 1 }, VK_ASTERISK }, // SHIFT "+" = "*"
427 { VK_GRAVE_o, { 0, 0, 0, 1 }, VK_CEDILLA_c }, // SHIFT "ò" = "ç"
428 { VK_GRAVE_a, { 0, 0, 0, 1 }, VK_DEGREE }, // SHIFT "à" = "°"
429 { VK_GRAVE_u, { 0, 0, 0, 1 }, VK_SECTION }, // SHIFT "ù" = "§"
430 { VK_LESS, { 0, 0, 0, 1 }, VK_GREATER }, // SHIFT "<" = ">"
431 { VK_COMMA, { 0, 0, 0, 1 }, VK_SEMICOLON }, // SHIFT "," = ";"
432 { VK_PERIOD, { 0, 0, 0, 1 }, VK_COLON }, // SHIFT "." = ":"
433 { VK_MINUS, { 0, 0, 0, 1 }, VK_UNDERSCORE }, // SHIFT "-" = "_"
434 { VK_BACKSLASH, { 0, 0, 1, 0 }, VK_GRAVEACCENT }, // ALT "\" = "`"
435 { VK_5, { 0, 0, 1, 0 }, VK_TILDE }, // ALT "5" = "~"
436 { VK_e, { 0, 0, 1, 0 }, VK_EURO }, // ALT "e" = "€"
437 { VK_GRAVE_e, { 0, 0, 1, 0 }, VK_LEFTBRACKET }, // ALT "è" = "["
438 { VK_PLUS, { 0, 0, 1, 0 }, VK_RIGHTBRACKET }, // ALT "+" = "]"
439 { VK_GRAVE_o, { 0, 0, 1, 0 }, VK_AT }, // ALT "ò" = "@"
440 { VK_GRAVE_a, { 0, 0, 1, 0 }, VK_HASH }, // ALT "à" = "#"
441 { VK_GRAVE_e, { 0, 0, 1, 1 }, VK_LEFTBRACE }, // SHIFT ALT "è" = "{"
442 { VK_PLUS, { 0, 0, 1, 1 }, VK_RIGHTBRACE }, // SHIFT ALT "+" = "}"
443 },
444
445 // deadkeys
446 {
447 },
448
449 // deadkeys translation
450 {
451 },
452};
453
454
455/**************************************************************************************/
456/* SPANISH LAYOUT */
457/* */
458/* Implemented by Carles Oriol (https://github.com/carlesoriol) */
459/**************************************************************************************/
460const KeyboardLayout SpanishLayout {
461 // name
462 "ES",
463
464 // desc
465 "Spanish",
466
467 // inherited layout
468 &USLayout, // To avoid conflict key combinations
469
470 // single byte scancodes
471 {
472 { 0x0E, VK_DEGREE },
473 { 0x4E, VK_QUOTE },
474 { 0x55, VK_EXCLAIM_INV }, // inverted exclaim
475 { 0x5D, VK_CEDILLA_c },
476
477 { 0x54, VK_GRAVEACCENT },
478 { 0x5B, VK_PLUS },
479
480 { 0x4C, VK_TILDE_n }, // spanish ñ
481 { 0x52, VK_ACUTEACCENT },
482
483 { 0x61, VK_LESS },
484 { 0x4A, VK_MINUS }
485
486 },
487
488 // extended scancodes (0xE0..)
489 {
490 },
491
492
493 // virtual keys generated by other virtual keys combinations
494 // in_key, { CTRL, LALT, RALT, SHIFT }, out_key
495 {
496
497 { VK_DEGREE, { 0, 0, 1, 0 }, VK_BACKSLASH }, // ALT "º" = "\"
498 { VK_DEGREE, { 0, 0, 0, 1 }, VK_UPPER_a }, // SHIFT "º" = "ª"
499
500 { VK_1, { 0, 0, 1, 0 }, VK_VERTICALBAR }, // ALT "1" = "|"
501 { VK_1, { 0, 0, 0, 1 }, VK_EXCLAIM }, // SHIFT "1" = "!"
502
503 { VK_2, { 0, 0, 0, 1 }, VK_QUOTEDBL }, // SHIFT "2" = """
504 { VK_2, { 0, 0, 1, 0 }, VK_AT }, // ALT "2" = "@"
505
506 { VK_3, { 0, 0, 0, 1 }, VK_INTERPUNCT }, // SHIFT "3" = "·"
507 { VK_3, { 0, 0, 1, 0 }, VK_HASH }, // SHIFT "3" = "#"
508
509 { VK_4, { 0, 0, 1, 0 }, VK_TILDE }, // SHIFT "4" = "~"
510
511 { VK_6, { 0, 0, 0, 1 }, VK_AMPERSAND }, // SHIFT "6" = "&"
512 { VK_6, { 0, 0, 1, 0 }, VK_NEGATION }, // ALT "6" = "¬"
513
514 { VK_7, { 0, 0, 0, 1 }, VK_SLASH }, // SHIFT "7" = "/"
515 { VK_8, { 0, 0, 0, 1 }, VK_LEFTPAREN }, // SHIFT "8" = "("
516 { VK_9, { 0, 0, 0, 1 }, VK_RIGHTPAREN }, // SHIFT "9" = ")"
517 { VK_0, { 0, 0, 0, 1 }, VK_EQUALS }, // SHIFT "0" = "="
518
519 { VK_QUOTE, { 0, 0, 0, 1 }, VK_QUESTION }, // SHIFT "'" = "?"
520 { VK_EXCLAIM_INV, { 0, 0, 0, 1 }, VK_QUESTION_INV }, // SHIFT "¡" = "¿"
521
522 { VK_GRAVEACCENT, { 0, 0, 0, 1 }, VK_CARET }, // SHIFT "`" = "^"
523 { VK_GRAVEACCENT, { 0, 0, 1, 0 }, VK_LEFTBRACKET }, // SHIFT "`" = "["
524
525 { VK_PLUS, { 0, 0, 0, 1 }, VK_ASTERISK }, // SHIFT "'" = "*"
526 { VK_PLUS, { 0, 0, 1, 0 }, VK_RIGHTBRACKET }, // SHIFT "'" = "]"
527
528 { VK_CEDILLA_c, { 0, 0, 0, 1 }, VK_CEDILLA_C }, // SHIFT "ç" = "Ç" // should be upper case
529 { VK_CEDILLA_c, { 0, 0, 1, 0 }, VK_RIGHTBRACE }, // ALT "ç" = "}" // should be upper case
530
531 { VK_ACUTEACCENT, { 0, 0, 0, 1 }, VK_DIAERESIS }, // ALT "'" = "¨" // should be diaeresis for vocals
532 { VK_ACUTEACCENT, { 0, 0, 1, 0 }, VK_LEFTBRACE }, // ALT "'" = "{" //
533
534 { VK_LESS, { 0, 0, 0, 1 }, VK_GREATER }, // SHIFT "<" = ">"
535 { VK_LESS, { 0, 0, 1, 0 }, VK_VERTICALBAR }, // ALT "<" = "|"
536
537 { VK_COMMA, { 0, 0, 0, 1 }, VK_SEMICOLON }, // SHIFT "," = ";"
538 { VK_PERIOD, { 0, 0, 0, 1 }, VK_COLON }, // SHIFT "." = ":"
539
540 { VK_MINUS, { 0, 0, 0, 1 }, VK_UNDERSCORE }, // SHIFT "-" = "_"
541
542 { VK_TILDE_n, { 0, 0, 0, 1 }, VK_TILDE_N }, // SHIFT "ñ" = "Ñ"
543 },
544
545 // deadkeys
546 {
550 VK_CARET,
551 },
552
553 // deadkeys translation
554 {
559
565
571
577
583
589
595
601
607 },
608};
609
610
611/**************************************************************************************/
612/* FRENCH LAYOUT */
613/* */
614/* Contributions from: */
615/* Alain Trentin */
616/* Denis Bodor (https://github.com/0xDRRB) */
617/**************************************************************************************/
618const KeyboardLayout FrenchLayout {
619 // name
620 "FR",
621
622 // desc
623 "French",
624
625 // inherited layout
626 &USLayout,
627
628 // single byte scancodes
629 {
630 { 0x0E, VK_SQUARE },
631 { 0x16, VK_AMPERSAND },
632 { 0x1E, VK_ACUTE_e },
633 { 0x26, VK_QUOTEDBL },
634 { 0x25, VK_QUOTE },
635 { 0x2E, VK_LEFTPAREN },
636 { 0x36, VK_MINUS },
637 { 0x3D, VK_GRAVE_e },
638 { 0x3E, VK_UNDERSCORE },
639 { 0x46, VK_CEDILLA_c },
640 { 0x45, VK_GRAVE_a },
641 { 0x4E, VK_RIGHTPAREN },
642 { 0x79, VK_EQUALS },
643
644 { 0x15, VK_a },
645 { 0x1D, VK_z },
646 { 0x54, VK_CARET },
647 { 0x5B, VK_DOLLAR },
648
649 { 0x1C, VK_q },
650 { 0x4C, VK_m },
651 { 0x52, VK_GRAVE_u },
652 { 0x5D, VK_ASTERISK },
653
654 { 0x61, VK_LESS },
655 { 0x1A, VK_w },
656 { 0x3A, VK_COMMA },
657 { 0x41, VK_SEMICOLON },
658 { 0x49, VK_COLON },
659 { 0x4A, VK_EXCLAIM },
660 { 0x55, VK_EXCLAIM_INV },
661
662 },
663
664 // extended scancodes (0xE0..)
665 {
666 },
667
668 // virtual keys generated by other virtual keys combinations
669 // in_key, { CTRL, LALT, RALT, SHIFT }, out_key
670 {
671 { VK_AMPERSAND, { 0, 0, 0, 1 }, VK_1 }, // SHIFT "&" = "1"
672 { VK_ACUTE_e, { 0, 0, 0, 1 }, VK_2 }, // SHIFT "é" = "2"
673 { VK_QUOTEDBL, { 0, 0, 0, 1 }, VK_3 }, // SHIFT """ = "3"
674 { VK_QUOTE, { 0, 0, 0, 1 }, VK_4 }, // SHIFT "'" = "4"
675 { VK_LEFTPAREN, { 0, 0, 0, 1 }, VK_5 }, // SHIFT "(" = "5"
676 { VK_MINUS, { 0, 0, 0, 1 }, VK_6 }, // SHIFT "-" = "6"
677 { VK_GRAVE_e, { 0, 0, 0, 1 }, VK_7 }, // SHIFT "è" = "7"
678 { VK_UNDERSCORE, { 0, 0, 0, 1 }, VK_8 }, // SHIFT "_" = "8"
679 { VK_CEDILLA_c, { 0, 0, 0, 1 }, VK_9 }, // SHIFT "ç" = "9"
680 { VK_GRAVE_a, { 0, 0, 0, 1 }, VK_0 }, // SHIFT "à" = "0"
681 { VK_RIGHTPAREN, { 0, 0, 0, 1 }, VK_DEGREE }, // SHIFT ")" = "°"
682 { VK_EQUALS, { 0, 0, 0, 1 }, VK_PLUS }, // SHIFT "=" = "+"
683 { VK_AMPERSAND, { 0, 0, 1, 0 }, VK_NONE }, // ALTGR "&" = ""
684 { VK_ACUTE_e, { 0, 0, 1, 0 }, VK_TILDE }, // ALTGR "é" = "~"
685 { VK_QUOTEDBL, { 0, 0, 1, 0 }, VK_HASH }, // ALTGR """ = "#"
686 { VK_QUOTE, { 0, 0, 1, 0 }, VK_LEFTBRACE }, // ALTGR "'" = "{"
687 { VK_LEFTPAREN, { 0, 0, 1, 0 }, VK_LEFTBRACKET }, // ALTGR "(" = "["
688 { VK_MINUS, { 0, 0, 1, 0 }, VK_VERTICALBAR }, // ALTGR "-" = "|"
689 { VK_GRAVE_e, { 0, 0, 1, 0 }, VK_GRAVEACCENT }, // ALTGR "è" = "`"
690 { VK_UNDERSCORE, { 0, 0, 1, 0 }, VK_BACKSLASH }, // ALTGR "_" = "\"
691 { VK_CEDILLA_c, { 0, 0, 1, 0 }, VK_CARET }, // ALTGR "ç" = "^"
692 { VK_GRAVE_a, { 0, 0, 1, 0 }, VK_AT }, // ALTGR "à" = "@"
693 { VK_RIGHTPAREN, { 0, 0, 1, 0 }, VK_RIGHTBRACKET }, // ALTGR ")" = "]"
694 { VK_EQUALS, { 0, 0, 1, 0 }, VK_RIGHTBRACE }, // ALTGR "=" = "}"
695 { VK_CARET, { 0, 0, 0, 1 }, VK_DIAERESIS }, // SHIFT "^" = "¨"
696 { VK_DOLLAR, { 0, 0, 0, 1 }, VK_POUND }, // SHIFT "$" = "£"
697 { VK_DOLLAR, { 0, 0, 1, 0 }, VK_CURRENCY }, // ALTGR "$" = "¤"
698 { VK_GRAVE_u, { 0, 0, 0, 1 }, VK_PERCENT }, // SHIFT "ù" = "%"
699 { VK_ASTERISK, { 0, 0, 0, 1 }, VK_MU }, // SHIFT "*" = "µ"
700 { VK_LESS, { 0, 0, 0, 1 }, VK_GREATER }, // SHIFT "<" = ">"
701 { VK_COMMA, { 0, 0, 0, 1 }, VK_QUESTION }, // SHIFT "," = "?"
702 { VK_SEMICOLON, { 0, 0, 0, 1 }, VK_PERIOD }, // SHIFT ";" = "."
703 { VK_COLON, { 0, 0, 0, 1 }, VK_SLASH }, // SHIFT ":" = "/"
704 { VK_EXCLAIM, { 0, 0, 0, 1 }, VK_SECTION }, // SHIFT "!" = "§"
705 { VK_e, { 0, 0, 1, 0 }, VK_EURO }, // ALTGR "e" = "€"
706 },
707
708 // deadkeys
709 {
710 VK_CARET,
712 },
713
714 // deadkeys translation
715 {
716 { VK_CARET, VK_a, VK_CARET_a }, // "â"
717 { VK_CARET, VK_e, VK_CARET_e }, // "ê"
718 { VK_CARET, VK_i, VK_CARET_i }, // "î"
719 { VK_CARET, VK_o, VK_CARET_o }, // "ô"
720 { VK_CARET, VK_u, VK_CARET_u }, // "û"
721
722 { VK_CARET, VK_A, VK_CARET_A }, // "Â"
723 { VK_CARET, VK_E, VK_CARET_E }, // "Ê"
724 { VK_CARET, VK_I, VK_CARET_I }, // "Î"
725 { VK_CARET, VK_O, VK_CARET_O }, // "Ô"
726 { VK_CARET, VK_U, VK_CARET_U }, // "Û"
727
728 { VK_DIAERESIS, VK_a, VK_CARET_a }, // "ä"
729 { VK_DIAERESIS, VK_e, VK_CARET_e }, // "ë"
730 { VK_DIAERESIS, VK_i, VK_CARET_i }, // "ï"
731 { VK_DIAERESIS, VK_o, VK_CARET_o }, // "ö"
732 { VK_DIAERESIS, VK_u, VK_CARET_u }, // "ü"
733
734 { VK_DIAERESIS, VK_A, VK_CARET_A }, // "Ä"
735 { VK_DIAERESIS, VK_E, VK_CARET_E }, // "Ë"
736 { VK_DIAERESIS, VK_I, VK_CARET_I }, // "Ï"
737 { VK_DIAERESIS, VK_O, VK_CARET_O }, // "Ö"
738 { VK_DIAERESIS, VK_U, VK_CARET_U } // "Ü"
739 },
740};
741
742
743
744/**************************************************************************************/
745/* BELGIAN LAYOUT */
746/* */
747/* Implemented by Michel Bernard (https://github.com/GmEsoft) */
748/**************************************************************************************/
749const KeyboardLayout BelgianLayout {
750 // name
751 "BE",
752
753 // desc
754 "Belgian",
755
756 // inherited layout
757 &USLayout,
758
759 // single byte scancodes
760 {
761 { 0x0E, VK_SQUARE }, // exponent 2
762 { 0x16, VK_AMPERSAND }, // 1 -> &
763 { 0x1E, VK_ACUTE_e }, // 2 -> é
764 { 0x26, VK_QUOTEDBL }, // 3 -> "
765 { 0x25, VK_QUOTE }, // 4 -> '
766 { 0x2E, VK_LEFTPAREN }, // 5 -> (
767 { 0x36, VK_SECTION }, // 6 -> §
768 { 0x3D, VK_GRAVE_e }, // 7 -> è
769 { 0x3E, VK_EXCLAIM }, // 8 -> !
770 { 0x46, VK_CEDILLA_c }, // 9 -> ç
771 { 0x45, VK_GRAVE_a }, // 0 -> à
772
773 { 0x15, VK_a }, // q -> a
774 { 0x1D, VK_z }, // w -> z
775 { 0x1C, VK_q }, // a -> q
776 { 0x1A, VK_w }, // z -> w
777 { 0x3A, VK_COMMA }, // m -> ,
778
779 { 0x4E, VK_RIGHTPAREN }, // - -> )
780 { 0x55, VK_MINUS }, // = -> -
781 { 0x54, VK_CARET }, // [ -> ^ (dead)
782 { 0x5B, VK_DOLLAR }, // ] -> $
783
784 { 0x5D, VK_MU }, // \ -> mu
785 { 0x61, VK_LESS }, // UK \ -> <
786
787 { 0x4C, VK_m }, // ; -> m
788 { 0x52, VK_GRAVE_u }, // ' -> ù
789 { 0x41, VK_SEMICOLON }, // , -> ;
790 { 0x49, VK_COLON }, // . -> :
791 { 0x4A, VK_EQUALS }, // / -> =
792
793 { 0x00, VK_NONE } // END MARKER
794 },
795
796 // extended scancodes (0xE0..)
797 {
798 { 0x00, VK_NONE } // END MARKER
799 },
800
801 // virtual keys generated by other virtual keys combinations
802 // in_key, { CTRL, LALT, RALT, SHIFT }, out_key
803 {
804 { VK_AMPERSAND, { 0, 0, 0, 1 }, VK_1 }, // SHIFT "&" = "1"
805 { VK_ACUTE_e, { 0, 0, 0, 1 }, VK_2 }, // SHIFT "é" = "2"
806 { VK_QUOTEDBL, { 0, 0, 0, 1 }, VK_3 }, // SHIFT """ = "3"
807 { VK_QUOTE, { 0, 0, 0, 1 }, VK_4 }, // SHIFT "'" = "4"
808 { VK_LEFTPAREN, { 0, 0, 0, 1 }, VK_5 }, // SHIFT "(" = "5"
809 { VK_SECTION, { 0, 0, 0, 1 }, VK_6 }, // SHIFT "§" = "6"
810 { VK_GRAVE_e, { 0, 0, 0, 1 }, VK_7 }, // SHIFT "è" = "7"
811 { VK_EXCLAIM, { 0, 0, 0, 1 }, VK_8 }, // SHIFT "!" = "8"
812 { VK_CEDILLA_c, { 0, 0, 0, 1 }, VK_9 }, // SHIFT "ç" = "9"
813 { VK_GRAVE_a, { 0, 0, 0, 1 }, VK_0 }, // SHIFT "à" = "0"
814
815 { VK_SQUARE, { 0, 0, 0, 1 }, VK_HASH }, // SHIFT "@" = "#" (Apple) or Cube (tbd)
816 { VK_RIGHTPAREN, { 0, 0, 0, 1 }, VK_DEGREE }, // SHIFT ")" = "°"
817 { VK_MINUS, { 0, 0, 0, 1 }, VK_UNDERSCORE }, // SHIFT "-" = "_"
818 { VK_CARET, { 0, 0, 0, 1 }, VK_DIAERESIS }, // SHIFT "^" = "¨"
819 { VK_DOLLAR, { 0, 0, 0, 1 }, VK_ASTERISK }, // SHIFT "$" = "*"
820 { VK_GRAVE_u, { 0, 0, 0, 1 }, VK_PERCENT }, // SHIFT "ù" = "%"
821 { VK_ESZETT, { 0, 0, 0, 1 }, VK_POUND }, // SHIFT "`" = "£"
822 { VK_LESS, { 0, 0, 0, 1 }, VK_GREATER }, // SHIFT "<" = ">"
823 { VK_COMMA, { 0, 0, 0, 1 }, VK_QUESTION }, // SHIFT "," = "?"
824 { VK_SEMICOLON, { 0, 0, 0, 1 }, VK_PERIOD }, // SHIFT ";" = "."
825 { VK_COLON, { 0, 0, 0, 1 }, VK_SLASH }, // SHIFT ":" = "/"
826 { VK_EQUALS, { 0, 0, 0, 1 }, VK_PLUS }, // SHIFT "=" = "+"
827
828 { VK_AMPERSAND, { 0, 0, 1, 0 }, VK_VERTICALBAR }, // ALTGR "&" = "|"
829 { VK_ACUTE_e, { 0, 0, 1, 0 }, VK_AT }, // ALTGR "é" = "@"
830 { VK_QUOTEDBL, { 0, 0, 1, 0 }, VK_HASH }, // ALTGR """ = "#"
831 { VK_QUOTE, { 0, 0, 1, 0 }, VK_LEFTBRACE }, // ALTGR "'" = "{" (add-on)
832 { VK_LEFTPAREN, { 0, 0, 1, 0 }, VK_LEFTBRACKET }, // ALTGR "(" = "[" (add-on)
833 { VK_SECTION, { 0, 0, 1, 0 }, VK_CARET }, // ALTGR "§" = "^" (should not be dead...)
834 { VK_CEDILLA_c, { 0, 0, 1, 0 }, VK_LEFTBRACE }, // ALTGR "ç" = "{"
835 { VK_GRAVE_a, { 0, 0, 1, 0 }, VK_RIGHTBRACE }, // ALTGR "à" = "}"
836 { VK_RIGHTPAREN, { 0, 0, 1, 0 }, VK_RIGHTBRACKET }, // ALTGR "à" = "]" (add-on)
837 { VK_GRAVE_a, { 0, 0, 1, 0 }, VK_RIGHTBRACE }, // ALTGR "-" = "}" (add-on)
838
839 { VK_e, { 0, 0, 1, 0 }, VK_EURO }, // ALTGR "e" = "€"
840 { VK_CARET, { 0, 0, 1, 0 }, VK_LEFTBRACKET }, // ALTGR "^" = "["
841 { VK_DOLLAR, { 0, 0, 1, 0 }, VK_RIGHTBRACKET }, // ALTGR "$" = "]"
842 { VK_GRAVE_u, { 0, 0, 1, 0 }, VK_ACUTEACCENT }, // ALTGR "ù" = "´"
843 { VK_MU, { 0, 0, 1, 0 }, VK_GRAVEACCENT }, // ALTGR "mu" = "`"
844 { VK_LESS, { 0, 0, 1, 0 }, VK_BACKSLASH }, // ALTGR "<" = "\"
845 { VK_EQUALS, { 0, 0, 1, 0 }, VK_TILDE }, // ALTGR "=" = "~"
846
847 { VK_NONE, { 0, 0, 0, 0 }, VK_NONE } // END MARKER
848 },
849
850 // deadkeys
851 {
852 VK_GRAVEACCENT, // `
853 VK_ACUTEACCENT, // ´
854 VK_DIAERESIS, // ¨
855 VK_CARET, // ^
856 VK_TILDE, // ~
857 VK_NONE // END MARKER
858 },
859
860 // deadkeys translation
861 {
867
874
881
888
895
902
909
916
923
930
931 { VK_NONE, VK_NONE, VK_NONE} // END MARKER
932
933 },
934};
935
936
937
938/**************************************************************************************/
939/* NORWEGIAN LAYOUT */
940/* */
941/* Implemented by Knut Zakariassen (https://github.com/zakariassen) */
942/**************************************************************************************/
943const KeyboardLayout NorwegianLayout{
944 // name
945 "NO",
946
947 // desc
948 "Norwegian",
949
950 // inherited layout
951 &USLayout,
952
953 // single byte scancodes
954 {
955 { 0x0E, VK_VERTICALBAR }, //
956 { 0x4E, VK_PLUS }, //
957 { 0x55, VK_BACKSLASH }, //
958 { 0x54, VK_aring }, // å
959 { 0x5B, VK_CARET }, //
960 { 0x4C, VK_oslash }, // ø
961 { 0x52, VK_aelig }, // æ
962 { 0x5D, VK_QUOTE }, //
963 { 0x61, VK_LESS }, //
964 { 0x4A, VK_MINUS }, //
965
966 },
967
968 // extended scancodes (0xE0..)
969 {
970 },
971
972 // virtual keys generated by other virtual keys combinations
973 // in_key, { CTRL, LALT, RALT, SHIFT }, out_key
974 {
975 { VK_VERTICALBAR, { 0, 0, 0, 1 }, VK_SECTION }, // SHIFT "|" = "§"
976 { VK_2, { 0, 0, 0, 1 }, VK_QUOTEDBL }, // SHIFT "2" = """
977 { VK_4, { 0, 0, 0, 1 }, VK_CURRENCY }, // SHIFT "4" = "¤"
978 { VK_6, { 0, 0, 0, 1 }, VK_AMPERSAND }, // SHIFT "6" = "&"
979 { VK_7, { 0, 0, 0, 1 }, VK_SLASH }, // SHIFT "7" = "/"
980 { VK_8, { 0, 0, 0, 1 }, VK_LEFTPAREN }, // SHIFT "8" = "("
981 { VK_9, { 0, 0, 0, 1 }, VK_RIGHTPAREN }, // SHIFT "9" = ")"
982 { VK_0, { 0, 0, 0, 1 }, VK_EQUALS }, // SHIFT "0" = "="
983 { VK_PLUS, { 0, 0, 0, 1 }, VK_QUESTION }, // SHIFT "+" = "?"
984 { VK_BACKSLASH, { 0, 0, 0, 1 }, VK_GRAVEACCENT }, // SHIFT "\" = "`"
985 { VK_aring, { 0, 0, 0, 1 }, VK_ARING }, // SHIFT "å" = "Å"
986 { VK_DIAERESIS, { 0, 0, 0, 1 }, VK_CARET }, // SHIFT "¨" = "^"
987 { VK_oslash, { 0, 0, 0, 1 }, VK_OSLASH }, // SHIFT "ø" = "Ø"
988 { VK_aelig, { 0, 0, 0, 1 }, VK_AELIG }, // SHIFT "æ" = "Æ"
989 { VK_QUOTE, { 0, 0, 0, 1 }, VK_ASTERISK }, // SHIFT "'" = "*"
990 { VK_LESS, { 0, 0, 0, 1 }, VK_GREATER }, // SHIFT "<" = ">"
991 { VK_COMMA, { 0, 0, 0, 1 }, VK_SEMICOLON }, // SHIFT "," = ";"
992 { VK_PERIOD, { 0, 0, 0, 1 }, VK_COLON }, // SHIFT "." = ":"
993 { VK_MINUS, { 0, 0, 0, 1 }, VK_UNDERSCORE }, // SHIFT "-" = "_"
994 { VK_BACKSLASH, { 0, 0, 0, 1 }, VK_GRAVEACCENT }, // SHIFT "\" = "`"
995
996 { VK_2, { 0, 0, 1, 0 }, VK_AT }, // ALTGR "2" = "@"
997 { VK_3, { 0, 0, 1, 0 }, VK_POUND }, // ALTGR "3" = "£"
998 { VK_4, { 0, 0, 1, 0 }, VK_DOLLAR }, // ALTGR "4" = "$"
999 { VK_5, { 0, 0, 1, 0 }, VK_EURO }, // ALTGR "5" = "€"
1000 { VK_7, { 0, 0, 1, 0 }, VK_LEFTBRACE }, // ALTGR "7" = "{"
1001 { VK_8, { 0, 0, 1, 0 }, VK_LEFTBRACKET }, // ALTGR "8" = "["
1002 { VK_9, { 0, 0, 1, 0 }, VK_RIGHTBRACKET }, // ALTGR "9" = "]"
1003 { VK_0, { 0, 0, 1, 0 }, VK_RIGHTBRACE }, // ALTGR "0" = "}"
1004 { VK_BACKSLASH, { 0, 0, 1, 0 }, VK_ACUTEACCENT }, // ALTGR "\" = "´"
1005 { VK_DIAERESIS, { 0, 0, 1, 0 }, VK_TILDE }, // ALTGR "¨" = "~"
1006 { VK_e, { 0, 0, 1, 0 }, VK_EURO }, // ALTGR "e" = "€"
1007 { VK_m, { 0, 0, 1, 0 }, VK_MU }, // ALTGR "m" = "µ"
1008
1009 },
1010
1011 // deadkeys
1012 {
1013 VK_GRAVEACCENT, // `
1014 VK_ACUTEACCENT, // ´
1015 VK_DIAERESIS, // ¨
1016 VK_CARET, // ^
1017 VK_TILDE, // ~
1018 VK_NONE // END MARKER
1019 },
1020
1021 // deadkeys translation
1022 {
1028
1034
1040
1047
1054
1061
1068
1069 { VK_CARET, VK_a, VK_CARET_a },
1070 { VK_CARET, VK_e, VK_CARET_e },
1071 { VK_CARET, VK_i, VK_CARET_i },
1072 { VK_CARET, VK_o, VK_CARET_o },
1073 { VK_CARET, VK_u, VK_CARET_u },
1074
1075 { VK_CARET, VK_A, VK_CARET_A },
1076 { VK_CARET, VK_E, VK_CARET_E },
1077 { VK_CARET, VK_I, VK_CARET_I },
1078 { VK_CARET, VK_O, VK_CARET_O },
1079 { VK_CARET, VK_U, VK_CARET_U },
1080
1081 { VK_TILDE, VK_n, VK_TILDE_n },
1082 { VK_TILDE, VK_N, VK_TILDE_N },
1083 { VK_TILDE, VK_a, VK_TILDE_a },
1084 { VK_TILDE, VK_A, VK_TILDE_A },
1085 { VK_TILDE, VK_o, VK_TILDE_o },
1086 { VK_TILDE, VK_O, VK_TILDE_O },
1087
1088 { VK_NONE, VK_NONE, VK_NONE } // END MARKER
1089 },
1090};
1091
1092
1093
1094/**************************************************************************************/
1095/* Japanese LAYOUT */
1096/* Credits: https://github.com/bellTanTan/fabglKeyboardJapaneseLayout */
1097/**************************************************************************************/
1098const KeyboardLayout JapaneseLayout {
1099 // name
1100 "JP",
1101
1102 // desc
1103 "Japanese",
1104
1105 // inherited layout
1106 &USLayout,
1107
1108 // single byte scancodes
1109 {
1110 { 0x0E, VK_HANKAKU_ZENKAKU_KANJI },
1111 { 0x55, VK_CARET },
1112 { 0x54, VK_AT },
1113 { 0x5B, VK_LEFTBRACKET },
1114 { 0x5D, VK_RIGHTBRACKET },
1115 { 0x52, VK_COLON },
1116 { 0x6A, VK_YEN },
1117 { 0x51, VK_BACKSLASH },
1118 { 0x67, VK_MUHENKAN },
1119 { 0x64, VK_HENKAN },
1120 { 0x13, VK_KATAKANA_HIRAGANA_ROMAJI },
1121 },
1122
1123 // extended scancodes (0xE0..)
1124 {
1125 },
1126
1127 // virtual keys generated by other virtual keys combinations
1128 // in_key, { CTRL, LALT, RALT, SHIFT }, out_key
1129 {
1130 { VK_2, { 0, 0, 0, 1 }, VK_QUOTEDBL }, // SHIFT "2" = """
1131 { VK_6, { 0, 0, 0, 1 }, VK_AMPERSAND }, // SHIFT "6" = "&"
1132 { VK_7, { 0, 0, 0, 1 }, VK_QUOTE }, // SHIFT "7" = "'"
1133 { VK_8, { 0, 0, 0, 1 }, VK_LEFTPAREN }, // SHIFT "8" = "("
1134 { VK_9, { 0, 0, 0, 1 }, VK_RIGHTPAREN }, // SHIFT "9" = ")"
1135 { VK_0, { 0, 0, 0, 1 }, VK_SHIFT_0 }, // SHIFT "0" = ""
1136 { VK_MINUS, { 0, 0, 0, 1 }, VK_EQUALS }, // SHIFT "-" = "="
1137 { VK_CARET, { 0, 0, 0, 1 }, VK_TILDE }, // SHIFT "^" = "~"
1138 { VK_YEN, { 0, 0, 0, 1 }, VK_VERTICALBAR }, // SHIFT "¥" = "|"
1139 { VK_AT, { 0, 0, 0, 1 }, VK_GRAVEACCENT }, // SHIFT "@" = "`"
1140 { VK_SEMICOLON, { 0, 0, 0, 1 }, VK_PLUS }, // SHIFT ";" = "+"
1141 { VK_COLON, { 0, 0, 0, 1 }, VK_ASTERISK }, // SHIFT ":" = "*"
1142 { VK_BACKSLASH, { 0, 0, 0, 1 }, VK_UNDERSCORE }, // SHIFT "\" = "_"
1143 },
1144
1145 // deadkeys
1146 {
1147 },
1148
1149 // deadkeys translation
1150 {
1151 },
1152};
1153
1154
1155} // end of namespace
1156
@ VK_GRAVE_e
Definition: fabutils.h:1280
@ VK_n
Definition: fabutils.h:1136
@ VK_PRINTSCREEN
Definition: fabutils.h:1231
@ VK_APPLICATION
Definition: fabutils.h:1251
@ VK_V
Definition: fabutils.h:1170
@ VK_F12
Definition: fabutils.h:1277
@ VK_CARET_A
Definition: fabutils.h:1328
@ VK_H
Definition: fabutils.h:1156
@ VK_GRAVE_y
Definition: fabutils.h:1284
@ VK_KP_LEFT
Definition: fabutils.h:1261
@ VK_PERIOD
Definition: fabutils.h:1191
@ VK_F8
Definition: fabutils.h:1273
@ VK_ACUTEACCENT
Definition: fabutils.h:1177
@ VK_N
Definition: fabutils.h:1162
@ VK_BREAK
Definition: fabutils.h:1244
@ VK_CARET_o
Definition: fabutils.h:1324
@ VK_w
Definition: fabutils.h:1145
@ VK_NUMLOCK
Definition: fabutils.h:1246
@ VK_KP_RIGHT
Definition: fabutils.h:1263
@ VK_m
Definition: fabutils.h:1135
@ VK_y
Definition: fabutils.h:1147
@ VK_RIGHTBRACE
Definition: fabutils.h:1207
@ VK_GRAVE_I
Definition: fabutils.h:1295
@ VK_GRAVE_Y
Definition: fabutils.h:1298
@ VK_ESZETT
Definition: fabutils.h:1347
@ VK_F7
Definition: fabutils.h:1272
@ VK_GRAVE_U
Definition: fabutils.h:1297
@ VK_o
Definition: fabutils.h:1137
@ VK_GRAVE_a
Definition: fabutils.h:1279
@ VK_p
Definition: fabutils.h:1138
@ VK_RETURN
Definition: fabutils.h:1249
@ VK_D
Definition: fabutils.h:1152
@ VK_SYSREQ
Definition: fabutils.h:1232
@ VK_ESCAPE
Definition: fabutils.h:1229
@ VK_LSHIFT
Definition: fabutils.h:1220
@ VK_CARET_U
Definition: fabutils.h:1332
@ VK_UPPER_a
Definition: fabutils.h:1346
@ VK_GRAVE_E
Definition: fabutils.h:1294
@ VK_COMMA
Definition: fabutils.h:1193
@ VK_R
Definition: fabutils.h:1166
@ VK_UMLAUT_e
Definition: fabutils.h:1308
@ VK_Q
Definition: fabutils.h:1165
@ VK_MU
Definition: fabutils.h:1354
@ VK_TILDE_a
Definition: fabutils.h:1338
@ VK_PAGEUP
Definition: fabutils.h:1252
@ VK_KP_END
Definition: fabutils.h:1242
@ VK_9
Definition: fabutils.h:1111
@ VK_RALT
Definition: fabutils.h:1223
@ VK_AELIG
Definition: fabutils.h:1360
@ VK_f
Definition: fabutils.h:1128
@ VK_d
Definition: fabutils.h:1126
@ VK_x
Definition: fabutils.h:1146
@ VK_CEDILLA_c
Definition: fabutils.h:1335
@ VK_TILDE
Definition: fabutils.h:1217
@ VK_ARING
Definition: fabutils.h:1362
@ VK_UMLAUT_a
Definition: fabutils.h:1307
@ VK_SPACE
Definition: fabutils.h:1100
@ VK_YEN
Definition: fabutils.h:1365
@ VK_F11
Definition: fabutils.h:1276
@ VK_F9
Definition: fabutils.h:1274
@ VK_LEFTBRACKET
Definition: fabutils.h:1208
@ VK_UMLAUT_A
Definition: fabutils.h:1314
@ VK_7
Definition: fabutils.h:1109
@ VK_ACUTE_A
Definition: fabutils.h:1300
@ VK_ACUTE_a
Definition: fabutils.h:1286
@ VK_K
Definition: fabutils.h:1159
@ VK_F2
Definition: fabutils.h:1267
@ VK_POUND
Definition: fabutils.h:1201
@ VK_CARET_e
Definition: fabutils.h:1322
@ VK_F1
Definition: fabutils.h:1266
@ VK_HASH
Definition: fabutils.h:1197
@ VK_ACUTE_e
Definition: fabutils.h:1287
@ VK_UMLAUT_U
Definition: fabutils.h:1318
@ VK_KP_PAGEDOWN
Definition: fabutils.h:1255
@ VK_UMLAUT_O
Definition: fabutils.h:1317
@ VK_LALT
Definition: fabutils.h:1222
@ VK_GREATER
Definition: fabutils.h:1213
@ VK_KP_MULTIPLY
Definition: fabutils.h:1185
@ VK_u
Definition: fabutils.h:1143
@ VK_UP
Definition: fabutils.h:1256
@ VK_LEFTPAREN
Definition: fabutils.h:1210
@ VK_GRAVE_o
Definition: fabutils.h:1282
@ VK_CARET_I
Definition: fabutils.h:1330
@ VK_VERTICALBAR
Definition: fabutils.h:1196
@ VK_a
Definition: fabutils.h:1123
@ VK_r
Definition: fabutils.h:1140
@ VK_SLASH
Definition: fabutils.h:1189
@ VK_DEGREE
Definition: fabutils.h:1215
@ VK_RIGHTPAREN
Definition: fabutils.h:1211
@ VK_QUOTE
Definition: fabutils.h:1178
@ VK_KP_UP
Definition: fabutils.h:1257
@ VK_SEMICOLON
Definition: fabutils.h:1194
@ VK_QUESTION_INV
Definition: fabutils.h:1349
@ VK_GRAVE_A
Definition: fabutils.h:1293
@ VK_z
Definition: fabutils.h:1148
@ VK_UMLAUT_I
Definition: fabutils.h:1316
@ VK_ASTERISK
Definition: fabutils.h:1186
@ VK_ACUTE_i
Definition: fabutils.h:1288
@ VK_END
Definition: fabutils.h:1241
@ VK_UNDERSCORE
Definition: fabutils.h:1214
@ VK_PAGEDOWN
Definition: fabutils.h:1254
@ VK_ACUTE_Y
Definition: fabutils.h:1305
@ VK_KP_DELETE
Definition: fabutils.h:1237
@ VK_RGUI
Definition: fabutils.h:1227
@ VK_B
Definition: fabutils.h:1150
@ VK_LCTRL
Definition: fabutils.h:1224
@ VK_ACUTE_O
Definition: fabutils.h:1303
@ VK_k
Definition: fabutils.h:1133
@ VK_KP_CENTER
Definition: fabutils.h:1264
@ VK_g
Definition: fabutils.h:1129
@ VK_AT
Definition: fabutils.h:1198
@ VK_O
Definition: fabutils.h:1163
@ VK_CARET_u
Definition: fabutils.h:1325
@ VK_DIAERESIS
Definition: fabutils.h:1351
@ VK_F5
Definition: fabutils.h:1270
@ VK_DOWN
Definition: fabutils.h:1258
@ VK_TILDE_O
Definition: fabutils.h:1343
@ VK_S
Definition: fabutils.h:1167
@ VK_AMPERSAND
Definition: fabutils.h:1195
@ VK_CURRENCY
Definition: fabutils.h:1353
@ VK_F6
Definition: fabutils.h:1271
@ VK_L
Definition: fabutils.h:1160
@ VK_HOME
Definition: fabutils.h:1239
@ VK_E
Definition: fabutils.h:1153
@ VK_C
Definition: fabutils.h:1151
@ VK_CARET_y
Definition: fabutils.h:1326
@ VK_SCROLLLOCK
Definition: fabutils.h:1245
@ VK_EQUALS
Definition: fabutils.h:1180
@ VK_CARET_O
Definition: fabutils.h:1331
@ VK_COLON
Definition: fabutils.h:1192
@ VK_F3
Definition: fabutils.h:1268
@ VK_P
Definition: fabutils.h:1164
@ VK_F
Definition: fabutils.h:1154
@ VK_6
Definition: fabutils.h:1108
@ VK_TAB
Definition: fabutils.h:1248
@ VK_v
Definition: fabutils.h:1144
@ VK_i
Definition: fabutils.h:1131
@ VK_U
Definition: fabutils.h:1169
@ VK_T
Definition: fabutils.h:1168
@ VK_KP_DOWN
Definition: fabutils.h:1259
@ VK_c
Definition: fabutils.h:1125
@ VK_TILDE_n
Definition: fabutils.h:1340
@ VK_KP_DIVIDE
Definition: fabutils.h:1188
@ VK_LEFTBRACE
Definition: fabutils.h:1206
@ VK_Y
Definition: fabutils.h:1173
@ VK_CEDILLA_C
Definition: fabutils.h:1336
@ VK_OSLASH
Definition: fabutils.h:1361
@ VK_LESS
Definition: fabutils.h:1212
@ VK_EXCLAIM
Definition: fabutils.h:1204
@ VK_TILDE_N
Definition: fabutils.h:1344
@ VK_5
Definition: fabutils.h:1107
@ VK_CARET_E
Definition: fabutils.h:1329
@ VK_UMLAUT_u
Definition: fabutils.h:1311
@ VK_ACUTE_E
Definition: fabutils.h:1301
@ VK_t
Definition: fabutils.h:1142
@ VK_GRAVE_O
Definition: fabutils.h:1296
@ VK_UMLAUT_y
Definition: fabutils.h:1312
@ VK_DELETE
Definition: fabutils.h:1236
@ VK_NEGATION
Definition: fabutils.h:1218
@ VK_KP_ENTER
Definition: fabutils.h:1250
@ VK_0
Definition: fabutils.h:1102
@ VK_CARET_Y
Definition: fabutils.h:1333
@ VK_GRAVEACCENT
Definition: fabutils.h:1176
@ VK_ACUTE_I
Definition: fabutils.h:1302
@ VK_LGUI
Definition: fabutils.h:1226
@ VK_A
Definition: fabutils.h:1149
@ VK_DOLLAR
Definition: fabutils.h:1200
@ VK_8
Definition: fabutils.h:1110
@ VK_1
Definition: fabutils.h:1103
@ VK_SECTION
Definition: fabutils.h:1216
@ VK_UMLAUT_o
Definition: fabutils.h:1310
@ VK_Z
Definition: fabutils.h:1174
@ VK_GRAVE_u
Definition: fabutils.h:1283
@ VK_CARET_a
Definition: fabutils.h:1321
@ VK_aring
Definition: fabutils.h:1358
@ VK_s
Definition: fabutils.h:1141
@ VK_F10
Definition: fabutils.h:1275
@ VK_X
Definition: fabutils.h:1172
@ VK_ACUTE_o
Definition: fabutils.h:1289
@ VK_BACKSPACE
Definition: fabutils.h:1238
@ VK_TILDE_o
Definition: fabutils.h:1339
@ VK_QUESTION
Definition: fabutils.h:1205
@ VK_MINUS
Definition: fabutils.h:1181
@ VK_UMLAUT_E
Definition: fabutils.h:1315
@ VK_BACKSLASH
Definition: fabutils.h:1187
@ VK_l
Definition: fabutils.h:1134
@ VK_NONE
Definition: fabutils.h:1098
@ VK_oslash
Definition: fabutils.h:1357
@ VK_RCTRL
Definition: fabutils.h:1225
@ VK_LEFT
Definition: fabutils.h:1260
@ VK_INTERPUNCT
Definition: fabutils.h:1350
@ VK_ACUTE_U
Definition: fabutils.h:1304
@ VK_b
Definition: fabutils.h:1124
@ VK_KP_INSERT
Definition: fabutils.h:1235
@ VK_J
Definition: fabutils.h:1158
@ VK_KP_MINUS
Definition: fabutils.h:1182
@ VK_CARET
Definition: fabutils.h:1199
@ VK_QUOTEDBL
Definition: fabutils.h:1179
@ VK_CARET_i
Definition: fabutils.h:1323
@ VK_ACUTE_y
Definition: fabutils.h:1291
@ VK_W
Definition: fabutils.h:1171
@ VK_UMLAUT_Y
Definition: fabutils.h:1319
@ VK_e
Definition: fabutils.h:1127
@ VK_EURO
Definition: fabutils.h:1202
@ VK_2
Definition: fabutils.h:1104
@ VK_RIGHTBRACKET
Definition: fabutils.h:1209
@ VK_KP_HOME
Definition: fabutils.h:1240
@ VK_UMLAUT_i
Definition: fabutils.h:1309
@ VK_h
Definition: fabutils.h:1130
@ VK_RIGHT
Definition: fabutils.h:1262
@ VK_F4
Definition: fabutils.h:1269
@ VK_PLUS
Definition: fabutils.h:1183
@ VK_SQUARE
Definition: fabutils.h:1352
@ VK_M
Definition: fabutils.h:1161
@ VK_4
Definition: fabutils.h:1106
@ VK_CAPSLOCK
Definition: fabutils.h:1247
@ VK_ACUTE_u
Definition: fabutils.h:1290
@ VK_I
Definition: fabutils.h:1157
@ VK_EXCLAIM_INV
Definition: fabutils.h:1348
@ VK_j
Definition: fabutils.h:1132
@ VK_KP_PAGEUP
Definition: fabutils.h:1253
@ VK_3
Definition: fabutils.h:1105
@ VK_RSHIFT
Definition: fabutils.h:1221
@ VK_q
Definition: fabutils.h:1139
@ VK_GRAVE_i
Definition: fabutils.h:1281
@ VK_G
Definition: fabutils.h:1155
@ VK_KP_PLUS
Definition: fabutils.h:1184
@ VK_PERCENT
Definition: fabutils.h:1203
@ VK_TILDE_A
Definition: fabutils.h:1342
@ VK_INSERT
Definition: fabutils.h:1234
This file contains keyboard layouts.