a5c009a399a13749eef015567d6b32c970a2e0b4
[reactos.git] / reactos / dll / keyboard / kbdsk / kbdsk.c
1 /*
2 * ReactOS Slovak Keyboard layout
3 * Copyright (C) 2005 ReactOS
4 * License: LGPL, see: LGPL.txt
5 *
6 * Created by Milan Margus (malin23@atlas.sk)
7 * Thanks to creators of others kbdxx.dll
8 */
9
10 #include <windows.h>
11 #include <internal/kbd.h>
12
13 #ifdef _M_IA64
14 #define ROSDATA static __declspec(allocate(".data"))
15 #else
16 #ifdef _MSC_VER
17 #pragma data_seg(".data")
18 #define ROSDATA static
19 #else
20 #define ROSDATA static __attribute__((section(".data")))
21 #endif
22 #endif
23
24 #define VK_EMPTY 0xff /* The non-existent VK */
25 #define KSHIFT 0x001 /* Shift modifier */
26 #define KCTRL 0x002 /* Ctrl modifier */
27 #define KALT 0x004 /* Alt modifier */
28 #define KEXT 0x100 /* Extended key code */
29 #define KMULTI 0x200 /* Multi-key */
30 #define KSPEC 0x400 /* Special key */
31 #define KNUMP 0x800 /* Number-pad */
32 #define KNUMS 0xc00 /* Special + number pad */
33 #define KMEXT 0x300 /* Multi + ext */
34
35 ROSDATA USHORT scancode_to_vk[] = {
36 /* Numbers Row */
37 /* - 00 - */
38 /* 1 ... 2 ... 3 ... 4 ... */
39 VK_EMPTY, VK_ESCAPE, '1', '2',
40 '3', '4', '5', '6',
41 '7', '8', '9', '0',
42 VK_OEM_MINUS, VK_OEM_PLUS, VK_BACK,
43 /* - 0f - */
44 /* First Letters Row */
45 VK_TAB, 'Q', 'W', 'E',
46 'R', 'T', 'Y', 'U',
47 'I', 'O', 'P',
48 VK_OEM_4, VK_OEM_6, VK_RETURN,
49 /* - 1d - */
50 /* Second Letters Row */
51 VK_LCONTROL,
52 'A', 'S', 'D', 'F',
53 'G', 'H', 'J', 'K',
54 'L', VK_OEM_1, VK_OEM_3, VK_OEM_8,
55 VK_LSHIFT, VK_OEM_7,
56 /* - 2c - */
57 /* Third letters row */
58 'Z', 'X', 'C', 'V',
59 'B', 'N', 'M', VK_OEM_COMMA,
60 VK_OEM_PERIOD,VK_OEM_2, VK_RSHIFT|KEXT,
61 /* - 37 - */
62 /* Bottom Row */
63 VK_MULTIPLY, VK_MENU, VK_SPACE, VK_CAPITAL,
64
65 /* - 3b - */
66 /* F-Keys */
67 VK_F1, VK_F2, VK_F3, VK_F4, VK_F5, VK_F6,
68 VK_F7, VK_F8, VK_F9, VK_F10,
69 /* - 45 - */
70 /* Locks */
71 VK_NUMLOCK | KMEXT,
72 VK_SCROLL | KMULTI,
73 /* - 47 - */
74 /* Number-Pad */
75 VK_HOME | KNUMS, VK_UP | KNUMS, VK_PRIOR | KNUMS, VK_SUBTRACT,
76 VK_LEFT | KNUMS, VK_CLEAR | KNUMS, VK_RIGHT | KNUMS, VK_ADD,
77 VK_END | KNUMS, VK_DOWN | KNUMS, VK_NEXT | KNUMS,
78 VK_INSERT | KNUMS, VK_DELETE | KNUMS,
79 /* - 54 - */
80 /* Presumably PrtSc */
81 VK_SNAPSHOT,
82 /* - 55 - */
83 /* Oddities, and the remaining standard F-Keys */
84 VK_EMPTY, VK_OEM_5, VK_F11, VK_F12,
85 /* - 59 - */
86 VK_CLEAR, VK_EMPTY, VK_EMPTY, VK_EMPTY, VK_EMPTY, /* EREOF */
87 VK_EMPTY, VK_EMPTY, VK_EMPTY, VK_EMPTY, VK_EMPTY, /* ZOOM */
88 VK_HELP,
89 /* - 64 - */
90 /* Even more F-Keys (for example, NCR keyboards from the early 90's) */
91 VK_F13, VK_F14, VK_F15, VK_F16, VK_F17, VK_F18, VK_F19, VK_F20,
92 VK_F21, VK_F22, VK_F23,
93 /* - 6f - */
94 /* Not sure who uses these codes */
95 VK_EMPTY, VK_EMPTY, VK_EMPTY,
96 /* - 72 - */
97 VK_EMPTY, VK_EMPTY, VK_EMPTY, VK_EMPTY,
98 /* - 76 - */
99 /* One more f-key */
100 VK_F24,
101 /* - 77 - */
102 VK_EMPTY, VK_EMPTY, VK_EMPTY, VK_EMPTY,
103 VK_EMPTY, VK_EMPTY, VK_EMPTY, VK_EMPTY, /* PA1 */
104 VK_EMPTY,
105 /* - 80 - */
106 0
107 };
108
109 ROSDATA VSC_VK extcode0_to_vk[] = {
110 { 0x10, VK_MEDIA_PREV_TRACK | KEXT },
111 { 0x19, VK_MEDIA_NEXT_TRACK | KEXT },
112 { 0x1D, VK_RCONTROL | KEXT },
113 { 0x20, VK_VOLUME_MUTE | KEXT },
114 { 0x21, VK_LAUNCH_APP2 | KEXT },
115 { 0x22, VK_MEDIA_PLAY_PAUSE | KEXT },
116 { 0x24, VK_MEDIA_STOP | KEXT },
117 { 0x2E, VK_VOLUME_DOWN | KEXT },
118 { 0x30, VK_VOLUME_UP | KEXT },
119 { 0x32, VK_BROWSER_HOME | KEXT },
120 { 0x35, VK_DIVIDE | KEXT },
121 { 0x37, VK_SNAPSHOT | KEXT },
122 { 0x38, VK_RMENU | KEXT },
123 { 0x47, VK_HOME | KEXT },
124 { 0x48, VK_UP | KEXT },
125 { 0x49, VK_PRIOR | KEXT },
126 { 0x4B, VK_LEFT | KEXT },
127 { 0x4D, VK_RIGHT | KEXT },
128 { 0x4F, VK_END | KEXT },
129 { 0x50, VK_DOWN | KEXT },
130 { 0x51, VK_NEXT | KEXT },
131 { 0x52, VK_INSERT | KEXT },
132 { 0x53, VK_DELETE | KEXT },
133 { 0x5B, VK_LWIN | KEXT },
134 { 0x5C, VK_RWIN | KEXT },
135 { 0x5D, VK_APPS | KEXT },
136 { 0x5F, VK_SLEEP | KEXT },
137 { 0x65, VK_BROWSER_SEARCH | KEXT },
138 { 0x66, VK_BROWSER_FAVORITES | KEXT },
139 { 0x67, VK_BROWSER_REFRESH | KEXT },
140 { 0x68, VK_BROWSER_STOP | KEXT },
141 { 0x69, VK_BROWSER_FORWARD | KEXT },
142 { 0x6A, VK_BROWSER_BACK | KEXT },
143 { 0x6B, VK_LAUNCH_APP1 | KEXT },
144 { 0x6C, VK_LAUNCH_MAIL | KEXT },
145 { 0x6D, VK_LAUNCH_MEDIA_SELECT | KEXT },
146 { 0x1C, VK_RETURN | KEXT },
147 { 0x46, VK_CANCEL | KEXT },
148 { 0, 0 },
149 };
150
151 ROSDATA VSC_VK extcode1_to_vk[] = {
152 { 0, 0 },
153 };
154
155 ROSDATA VK_TO_BIT modifier_keys[] = {
156 { VK_SHIFT, KSHIFT },
157 { VK_CONTROL, KCTRL },
158 { VK_MENU, KALT },
159 { 0, 0 }
160 };
161
162 ROSDATA MODIFIERS modifier_bits = {
163 modifier_keys,
164 7,
165 { 0, 1, 2, 0 ,0, 0,3,0} /* Modifier bit order, NONE, SHIFT, CTRL, SHIFT+CTRL,ALT(not used),SHIFT-ALT (not used), CTR+ALT, SHIFT-CTRL-ALT*/
166 };
167
168 #define NOCAPS 0
169 #define CAPS KSHIFT /* Caps -> shift */
170
171 ROSDATA VK_TO_WCHARS2 key_to_chars_2mod[] = {
172 /* Normal vs Shifted */
173 { VK_OEM_8, NOCAPS, {';', WCH_DEAD} }, // degree sign
174 { VK_EMPTY, 0, {WCH_NONE, 0x00b0} }, // VK_OEM_8 death
175
176 /* Keys that do not have shift states */
177 { VK_TAB, NOCAPS, {'\t','\t'} },
178 { VK_ADD, NOCAPS, {'+', '+'} },
179 { VK_SUBTRACT, NOCAPS, {'-', '-'} },
180 { VK_MULTIPLY, NOCAPS, {'*', '*'} },
181 { VK_DIVIDE, NOCAPS, {'/', '/'} },
182 { VK_ESCAPE, NOCAPS, {'\x1b','\x1b'} },
183 { VK_SPACE, NOCAPS, {' ', ' '} },
184 { 0, 0 }
185 };
186
187 ROSDATA VK_TO_WCHARS3 key_to_chars_3mod[] = {
188 /* Normal, Shifted, Ctrl */
189 /* Legacy (telnet-style) ascii escapes */
190 { VK_RETURN, 0, {'\r', '\r', '\n'} },
191 { 0, 0 }
192 };
193
194 ROSDATA VK_TO_WCHARS4 key_to_chars_4mod[] = {
195 /* Normal, Shifted, Ctrl, Ctrl+Alt */
196
197 /* The numbers */
198 { '1', NOCAPS, {'+', '1', WCH_NONE, '~'} },
199 { '2', NOCAPS, {0x013e, '2', WCH_NONE, WCH_DEAD} }, // l with caron
200 { VK_EMPTY, 0, {WCH_NONE, WCH_NONE, WCH_NONE, 0x02c7} }, // 2 death
201 { '3', NOCAPS, {0x0161, '3', WCH_NONE, WCH_DEAD} }, // s with caron
202 { VK_EMPTY, 0, {WCH_NONE, WCH_NONE, WCH_NONE, 0x005e} }, // 3 death
203 { '4', NOCAPS, {0x010d, '4', WCH_NONE, WCH_DEAD} }, // c with caron
204 { VK_EMPTY, 0, {WCH_NONE, WCH_NONE, WCH_NONE, 0x02d8} }, // 4 death
205 { '5', NOCAPS, {0x0165, '5', WCH_NONE, WCH_DEAD} }, // t with caron
206 { VK_EMPTY, 0, {WCH_NONE, WCH_NONE, WCH_NONE, 0x00b0} }, // 5 death
207 { '6', NOCAPS, {0x017e, '6', WCH_NONE, WCH_DEAD} }, // z with caron
208 { VK_EMPTY, 0, {WCH_NONE, WCH_NONE, WCH_NONE, 0x02db} }, // 6 death
209 { '7', NOCAPS, {0x00fd, '7', WCH_NONE, '`'} }, // y with acute
210 { '8', NOCAPS, {0x00e1, '8', WCH_NONE, WCH_DEAD} }, // a with acute
211 { VK_EMPTY, 0, {WCH_NONE, WCH_NONE, WCH_NONE, 0x02d9} }, // 8 death
212 { '9', NOCAPS, {0x00ed, '9', WCH_NONE, WCH_DEAD} }, // i with acute
213 { VK_EMPTY, 0, {WCH_NONE, WCH_NONE, WCH_NONE, 0x00b4} }, // 9 death
214 { '0', NOCAPS, {0x00e9, '0', WCH_NONE, WCH_DEAD} }, // e with acute
215 { VK_EMPTY, 0, {WCH_NONE, WCH_NONE, WCH_NONE, 0x02dd} }, // 0 death
216 { VK_OEM_MINUS, NOCAPS, {'=', '%', WCH_NONE, WCH_DEAD} },
217 { VK_EMPTY, 0, {WCH_NONE, WCH_NONE, WCH_NONE, 0x00a8} }, // = death
218 { VK_OEM_PLUS, NOCAPS, {WCH_DEAD, WCH_DEAD, WCH_NONE, WCH_DEAD} }, // dead letters - acute, caron
219 { VK_EMPTY, 0, {0x00b4, 0x02c7, WCH_NONE, 0x00b8} }, // dead letters death :)
220
221 { VK_OEM_1, NOCAPS, {0x00f4, '\"', WCH_NONE, '$'} }, // o with circumflex
222 { VK_OEM_2, NOCAPS, {'-', '_', WCH_NONE, '*'} },
223 { VK_OEM_3, NOCAPS, {0x00a7, '!', WCH_NONE, 0x00df} }, // section sign
224 { VK_OEM_4, NOCAPS, {0x00fa, '/', WCH_NONE, 0x00f7} }, // u with acute
225 { VK_OEM_5, NOCAPS, {'&', '*', WCH_NONE, '<'} },
226 { VK_OEM_6, NOCAPS, {0x00E4, '(', WCH_NONE, 0x00d7} }, // a with diaeresis
227 { VK_OEM_7, NOCAPS, {0x0148, ')', WCH_NONE, 0x00a4} }, // n with caron
228 { VK_OEM_COMMA, NOCAPS, {',', '?', WCH_NONE, '<'} },
229 { VK_OEM_PERIOD, NOCAPS, {'.', ':', WCH_NONE, '>'} },
230
231 /* The alphabet */
232 { 'A', CAPS, {'a', 'A', 0x01, WCH_NONE} },
233 { 'B', CAPS, {'b', 'B', 0x02, '{'} },
234 { 'C', CAPS, {'c', 'C', 0x03, '&'} },
235 { 'D', CAPS, {'d', 'D', 0x04, 0x0110} },
236 { 'E', CAPS, {'e', 'E', 0x05, 0x20ac} },
237 { 'F', CAPS, {'f', 'F', 0x06, '['} },
238 { 'G', CAPS, {'g', 'G', 0x07, ']'} },
239 { 'H', CAPS, {'h', 'H', 0x08, WCH_NONE} },
240 { 'I', CAPS, {'i', 'I', 0x09, WCH_NONE} },
241 { 'J', CAPS, {'j', 'J', 0x0a, WCH_NONE} },
242 { 'K', CAPS, {'k', 'K', 0x0b, 0x0142} },
243 { 'L', CAPS, {'l', 'L', 0x0c, 0x0141} },
244 { 'M', CAPS, {'m', 'M', 0x0d, WCH_NONE} },
245 { 'N', CAPS, {'n', 'N', 0x0e, '}'} },
246 { 'O', CAPS, {'o', 'O', 0x0f, WCH_NONE} },
247 { 'P', CAPS, {'p', 'P', 0x10, '\''} },
248 { 'Q', CAPS, {'q', 'Q', 0x11, '\\'} },
249 { 'R', CAPS, {'r', 'R', 0x12, WCH_NONE} },
250 { 'S', CAPS, {'s', 'S', 0x13, 0x0111} },
251 { 'T', CAPS, {'t', 'T', 0x14, WCH_NONE} },
252 { 'U', CAPS, {'u', 'U', 0x15, WCH_NONE} },
253 { 'V', CAPS, {'v', 'V', 0x16, '@'} },
254 { 'W', CAPS, {'w', 'W', 0x17, '|'} },
255 { 'X', CAPS, {'x', 'X', 0x18, '#'} },
256 { 'Y', CAPS, {'z', 'Z', 0x1a, WCH_NONE} }, // qwertZ
257 { 'Z', CAPS, {'y', 'Y', 0x19, '>'} },
258 { 0, 0 }
259 };
260
261 ROSDATA VK_TO_WCHARS1 keypad_numbers[] = {
262 { VK_DECIMAL, 0, {','} },
263 { VK_NUMPAD0, 0, {'0'} },
264 { VK_NUMPAD1, 0, {'1'} },
265 { VK_NUMPAD2, 0, {'2'} },
266 { VK_NUMPAD3, 0, {'3'} },
267 { VK_NUMPAD4, 0, {'4'} },
268 { VK_NUMPAD5, 0, {'5'} },
269 { VK_NUMPAD6, 0, {'6'} },
270 { VK_NUMPAD7, 0, {'7'} },
271 { VK_NUMPAD8, 0, {'8'} },
272 { VK_NUMPAD9, 0, {'9'} },
273 { VK_BACK, 0, {'\010'} },
274 { 0, 0 }
275 };
276
277 #define vk_master(n,x) { (PVK_TO_WCHARS1)x, n, sizeof(x[0]) }
278
279 ROSDATA VK_TO_WCHAR_TABLE vk_to_wchar_master_table[] = {
280 vk_master(1,keypad_numbers),
281 vk_master(2,key_to_chars_2mod),
282 vk_master(3,key_to_chars_3mod),
283 vk_master(4,key_to_chars_4mod),
284 { 0,0,0 }
285 };
286
287 ROSDATA VSC_LPWSTR key_names[] = {
288 { 0x00, L"" },
289 { 0x01, L"Esc" },
290 { 0x0e, L"Backspace" },
291 { 0x0f, L"Tab" },
292 { 0x1c, L"Enter" },
293 { 0x1d, L"Ctrl" },
294 { 0x2a, L"Shift" },
295 { 0x36, L"Right Shift" },
296 { 0x37, L"Num *" },
297 { 0x38, L"Alt" },
298 { 0x39, L"Space" },
299 { 0x3a, L"Caps Lock" },
300 { 0x3b, L"F1" },
301 { 0x3c, L"F2" },
302 { 0x3d, L"F3" },
303 { 0x3e, L"F4" },
304 { 0x3f, L"F5" },
305 { 0x40, L"F6" },
306 { 0x41, L"F7" },
307 { 0x42, L"F8" },
308 { 0x43, L"F9" },
309 { 0x44, L"F10" },
310 { 0x45, L"Pause" },
311 { 0x46, L"Scroll Lock" },
312 { 0x47, L"Num 7" },
313 { 0x48, L"Num 8" },
314 { 0x49, L"Num 9" },
315 { 0x4a, L"Num -" },
316 { 0x4b, L"Num 4" },
317 { 0x4c, L"Num 5" },
318 { 0x4d, L"Num 6" },
319 { 0x4e, L"Num +" },
320 { 0x4f, L"Num 1" },
321 { 0x50, L"Num 2" },
322 { 0x51, L"Num 3" },
323 { 0x52, L"Num 0" },
324 { 0x53, L"Num Del" },
325 { 0x54, L"Sys Req" },
326 { 0x57, L"F11" },
327 { 0x58, L"F12" },
328 { 0x7c, L"F13" },
329 { 0x7d, L"F14" },
330 { 0x7e, L"F15" },
331 { 0x7f, L"F16" },
332 { 0x80, L"F17" },
333 { 0x81, L"F18" },
334 { 0x82, L"F19" },
335 { 0x83, L"F20" },
336 { 0x84, L"F21" },
337 { 0x85, L"F22" },
338 { 0x86, L"F23" },
339 { 0x87, L"F24" },
340 { 0, NULL },
341 };
342
343 ROSDATA VSC_LPWSTR extended_key_names[] = {
344 { 0x1c, L"Num Enter" },
345 { 0x1d, L"Right Ctrl" },
346 { 0x35, L"Num /" },
347 { 0x37, L"Prnt Scrn" },
348 { 0x38, L"Right Alt" },
349 { 0x45, L"Num Lock" },
350 { 0x46, L"Break" },
351 { 0x47, L"Home" },
352 { 0x48, L"Up" },
353 { 0x49, L"Page Up" },
354 { 0x4a, L"Left" },
355 { 0x4c, L"Center" },
356 { 0x4d, L"Right" },
357 { 0x4f, L"End" },
358 { 0x50, L"Down" },
359 { 0x51, L"Page Down" },
360 { 0x52, L"Insert" },
361 { 0x53, L"Delete" },
362 { 0x54, L"<ReactOS>" },
363 { 0x55, L"Help" },
364 { 0x56, L"Left Windows" },
365 { 0x5b, L"Right Windows" },
366 { 0, NULL },
367 };
368
369 #define DEADTRANS(ch, accent, comp, flags) MAKELONG(ch, accent), comp, flags
370
371 ROSDATA DEADKEY dead_key[] = {
372 { DEADTRANS(0x0043, 0x02c7, 0x010c, 0x0000) }, // C with caron
373 { DEADTRANS(0x0063, 0x02c7, 0x010d, 0x0000) }, // c with caron
374 { DEADTRANS(0x0044, 0x02c7, 0x010e, 0x0000) }, // D with caron
375 { DEADTRANS(0x0064, 0x02c7, 0x010f, 0x0000) }, // d with caron
376 { DEADTRANS(0x004c, 0x02c7, 0x013d, 0x0000) }, // L with caron
377 { DEADTRANS(0x006c, 0x02c7, 0x013e, 0x0000) }, // l with caron
378 { DEADTRANS(0x004e, 0x02c7, 0x0147, 0x0000) }, // N with caron
379 { DEADTRANS(0x006e, 0x02c7, 0x0148, 0x0000) }, // n with caron
380 { DEADTRANS(0x0053, 0x02c7, 0x0160, 0x0000) }, // S with caron
381 { DEADTRANS(0x0073, 0x02c7, 0x0161, 0x0000) }, // s with caron
382 { DEADTRANS(0x0054, 0x02c7, 0x0164, 0x0000) }, // T with caron
383 { DEADTRANS(0x0074, 0x02c7, 0x0165, 0x0000) }, // t with caron
384 { DEADTRANS(0x005a, 0x02c7, 0x017d, 0x0000) }, // Z with caron
385 { DEADTRANS(0x007a, 0x02c7, 0x017e, 0x0000) }, // z with caron
386 { DEADTRANS(0x0020, 0x02c7, 0x02c7, 0x0000) }, // space > caron
387
388 { DEADTRANS(0x0041, 0x00b4, 0x00c1, 0x0000) }, // A with acute
389 { DEADTRANS(0x0061, 0x00b4, 0x00e1, 0x0000) }, // a with acute
390 { DEADTRANS(0x0045, 0x00b4, 0x00c9, 0x0000) }, // E with acute
391 { DEADTRANS(0x0065, 0x00b4, 0x00e9, 0x0000) }, // e with acute
392 { DEADTRANS(0x0049, 0x00b4, 0x00cd, 0x0000) }, // I with acute
393 { DEADTRANS(0x0069, 0x00b4, 0x00ed, 0x0000) }, // i with acute
394 { DEADTRANS(0x004c, 0x00b4, 0x0139, 0x0000) }, // L with acute
395 { DEADTRANS(0x006c, 0x00b4, 0x013a, 0x0000) }, // l with acute
396 { DEADTRANS(0x004f, 0x00b4, 0x00d3, 0x0000) }, // O with acute
397 { DEADTRANS(0x006f, 0x00b4, 0x00f3, 0x0000) }, // o with acute
398 { DEADTRANS(0x0052, 0x00b4, 0x0154, 0x0000) }, // R with acute
399 { DEADTRANS(0x0072, 0x00b4, 0x0155, 0x0000) }, // r with acute
400 { DEADTRANS(0x0055, 0x00b4, 0x00da, 0x0000) }, // U with acute
401 { DEADTRANS(0x0075, 0x00b4, 0x00fa, 0x0000) }, // u with acute
402 { DEADTRANS(0x0059, 0x00b4, 0x00dd, 0x0000) }, // Y with acute
403 { DEADTRANS(0x0079, 0x00b4, 0x00fd, 0x0000) }, // y with acute
404 { DEADTRANS(0x0020, 0x00b4, 0x00b4, 0x0000) }, // space > acute
405
406 { DEADTRANS(0x004f, 0x005e, 0x00d4, 0x0000) }, // O with circumflex
407 { DEADTRANS(0x006f, 0x005e, 0x00f4, 0x0000) }, // o with circumflex
408 { DEADTRANS(0x0020, 0x005e, 0x005e, 0x0000) }, // space > circumflex
409
410 { DEADTRANS(0x0041, 0x00a8, 0x00c4, 0x0000) }, // A with diaeresis
411 { DEADTRANS(0x0061, 0x00a8, 0x00e4, 0x0000) }, // a with diaeresis
412 { DEADTRANS(0x0045, 0x00a8, 0x00cb, 0x0000) }, // E with diaeresis
413 { DEADTRANS(0x0065, 0x00a8, 0x00eb, 0x0000) }, // e with diaeresis
414 { DEADTRANS(0x004f, 0x00a8, 0x00d6, 0x0000) }, // O with diaeresis
415 { DEADTRANS(0x006f, 0x00a8, 0x00f6, 0x0000) }, // o with diaeresis
416 { DEADTRANS(0x0055, 0x00a8, 0x00dc, 0x0000) }, // U with diaeresis
417 { DEADTRANS(0x0075, 0x00a8, 0x00fc, 0x0000) }, // u with diaeresis
418 { DEADTRANS(0x0020, 0x00a8, 0x00a8, 0x0000) }, // space > diaeresis
419
420 { DEADTRANS(0x0055, 0x00b0, 0x016e, 0x0000) }, // U with round
421 { DEADTRANS(0x0075, 0x00b0, 0x016f, 0x0000) }, // u with round
422 { DEADTRANS(0x0020, 0x00b0, 0x00b0, 0x0000) }, // space > degree
423 { 0, 0, 0 },
424 };
425
426 ROSDATA DEADKEY_LPWSTR dead_key_names[] = {
427 L"\x02c7" L"\x004D\x00E4\x006B\x010D\x0065\x0148", // mäkčeň - caron
428 L"\x00b4" L"\x0044\x013A\x017E\x0065\x0148", // dĺžeň - acute
429 L"\x005e" L"\x0056\x006F\x006B\x00E1\x0148", // vokáň - circumflex
430 NULL
431 };
432
433 /* Finally, the master table */
434 ROSDATA KBDTABLES keyboard_layout_table = {
435 /* modifier assignments */
436 &modifier_bits,
437
438 /* character from vk tables */
439 vk_to_wchar_master_table,
440
441 /* diacritical marks -- */
442 dead_key,
443
444 /* Key names */
445 (VSC_LPWSTR *)key_names,
446 (VSC_LPWSTR *)extended_key_names,
447 dead_key_names, /* Dead key names */
448
449 /* scan code to virtual key maps */
450 scancode_to_vk,
451 sizeof(scancode_to_vk) / sizeof(scancode_to_vk[0]),
452 extcode0_to_vk,
453 extcode1_to_vk,
454
455
456 MAKELONG(0,1), /* Version 1.0 */
457
458 /* Ligatures -- Slovak doesn't have any */
459 0,
460 0,
461 NULL
462 };
463
464 PKBDTABLES STDCALL KbdLayerDescriptor(VOID) {
465 return &keyboard_layout_table;
466 }
467