1c2c66affSColin Finck /*
2c2c66affSColin Finck * ReactOS German NEO ASCII Keyboard layout
3c2c66affSColin Finck * Copyright (C) 2008 ReactOS
4c2c66affSColin Finck * License: LGPL, see: LGPL.txt
5c2c66affSColin Finck *
6c2c66affSColin Finck * Thanks to: http://www.barcodeman.com/altek/mule/scandoc.php
7c2c66affSColin Finck * and http://win.tue.nl/~aeb/linux/kbd/scancodes-1.html
8c2c66affSColin Finck */
9c2c66affSColin Finck
10c2c66affSColin Finck #define WIN32_NO_STATUS
11c2c66affSColin Finck #include <stdarg.h>
12c2c66affSColin Finck #include <windef.h>
13c2c66affSColin Finck #include <winuser.h>
14c2c66affSColin Finck #include <ndk/kbd.h>
15c2c66affSColin Finck
16c2c66affSColin Finck #ifdef _M_IA64
17c2c66affSColin Finck #define ROSDATA static __declspec(allocate(".data"))
18c2c66affSColin Finck #else
19c2c66affSColin Finck #ifdef _MSC_VER
20c2c66affSColin Finck #pragma data_seg(".data")
21c2c66affSColin Finck #define ROSDATA static
22c2c66affSColin Finck #else
23c2c66affSColin Finck #define ROSDATA static __attribute__((section(".data")))
24c2c66affSColin Finck #endif
25c2c66affSColin Finck #endif
26c2c66affSColin Finck
27c2c66affSColin Finck #define VK_EMPTY 0xff /* The non-existent VK */
28c2c66affSColin Finck
29c2c66affSColin Finck #define KNUMS KBDNUMPAD|KBDSPECIAL /* Special + number pad */
30c2c66affSColin Finck #define KMEXT KBDEXT|KBDMULTIVK /* Multi + ext */
31c2c66affSColin Finck
32c2c66affSColin Finck ROSDATA USHORT scancode_to_vk[] = {
33c2c66affSColin Finck /* Numbers Row */
34c2c66affSColin Finck /* - 00 - */
35c2c66affSColin Finck /* 1 ... 2 ... 3 ... 4 ... */
36c2c66affSColin Finck VK_EMPTY, VK_ESCAPE, '1', '2',
37c2c66affSColin Finck '3', '4', '5', '6',
38c2c66affSColin Finck '7', '8', '9', '0',
39c2c66affSColin Finck VK_OEM_MINUS, VK_OEM_6, VK_BACK,
40c2c66affSColin Finck /* - 0f - */
41c2c66affSColin Finck /* First Letters Row */
42c2c66affSColin Finck VK_TAB, 'Q', 'V', 'L',
43c2c66affSColin Finck 'C', 'W', 'K', 'H',
44c2c66affSColin Finck 'G', 'F', 'J',
45c2c66affSColin Finck VK_OEM_4, VK_OEM_PLUS, VK_RETURN,
46c2c66affSColin Finck /* - 1d - */
47c2c66affSColin Finck /* Second Letters Row */
48c2c66affSColin Finck VK_LCONTROL,
49c2c66affSColin Finck 'U', 'I', 'A', 'E',
50c2c66affSColin Finck 'O', 'S', 'N', 'R',
51c2c66affSColin Finck 'T', 'D', 'Y', VK_OEM_5,
52c2c66affSColin Finck VK_LSHIFT, VK_OEM_2,
53c2c66affSColin Finck /* - 2c - */
54c2c66affSColin Finck /* Third letters row */
55c2c66affSColin Finck VK_OEM_3, VK_OEM_1, VK_OEM_7, 'P',
56c2c66affSColin Finck 'Z', 'B', 'M', VK_OEM_COMMA,
57c2c66affSColin Finck VK_OEM_PERIOD,'X', VK_RSHIFT,
58c2c66affSColin Finck /* - 37 - */
59c2c66affSColin Finck /* Bottom Row */
60c2c66affSColin Finck VK_MULTIPLY, VK_LMENU, VK_SPACE, VK_CAPITAL,
61c2c66affSColin Finck
62c2c66affSColin Finck /* - 3b - */
63c2c66affSColin Finck /* F-Keys */
64c2c66affSColin Finck VK_F1, VK_F2, VK_F3, VK_F4, VK_F5, VK_F6,
65c2c66affSColin Finck VK_F7, VK_F8, VK_F9, VK_F10,
66c2c66affSColin Finck /* - 45 - */
67c2c66affSColin Finck /* Locks */
68c2c66affSColin Finck VK_NUMLOCK | KMEXT,
69c2c66affSColin Finck VK_SCROLL | KBDMULTIVK,
70c2c66affSColin Finck /* - 47 - */
71c2c66affSColin Finck /* Number-Pad */
72c2c66affSColin Finck VK_HOME | KNUMS, VK_UP | KNUMS, VK_PRIOR | KNUMS, VK_SUBTRACT,
73c2c66affSColin Finck VK_LEFT | KNUMS, VK_CLEAR | KNUMS, VK_RIGHT | KNUMS, VK_ADD,
74c2c66affSColin Finck VK_END | KNUMS, VK_DOWN | KNUMS, VK_NEXT | KNUMS,
75c2c66affSColin Finck VK_INSERT | KNUMS, VK_DELETE | KNUMS,
76c2c66affSColin Finck /* - 54 - */
77c2c66affSColin Finck /* Presumably PrtSc */
78c2c66affSColin Finck VK_SNAPSHOT,
79c2c66affSColin Finck /* - 55 - */
80c2c66affSColin Finck /* Oddities, and the remaining standard F-Keys */
81c2c66affSColin Finck VK_EMPTY, VK_OEM_102, VK_F11, VK_F12,
82c2c66affSColin Finck /* - 59 - */
83c2c66affSColin Finck VK_CLEAR, VK_EMPTY, VK_EMPTY, VK_EMPTY, VK_EMPTY, /* EREOF */
84c2c66affSColin Finck VK_EMPTY, VK_EMPTY, VK_EMPTY, VK_EMPTY, VK_EMPTY, /* ZOOM */
85c2c66affSColin Finck VK_HELP,
86c2c66affSColin Finck /* - 64 - */
87c2c66affSColin Finck /* Even more F-Keys (for example, NCR keyboards from the early 90's) */
88c2c66affSColin Finck VK_F13, VK_F14, VK_F15, VK_F16, VK_F17, VK_F18, VK_F19, VK_F20,
89c2c66affSColin Finck VK_F21, VK_F22, VK_F23,
90c2c66affSColin Finck /* - 6f - */
91c2c66affSColin Finck /* Not sure who uses these codes */
92c2c66affSColin Finck VK_EMPTY, VK_EMPTY, VK_EMPTY,
93c2c66affSColin Finck /* - 72 - */
94c2c66affSColin Finck VK_EMPTY, VK_EMPTY, VK_EMPTY, VK_EMPTY,
95c2c66affSColin Finck /* - 76 - */
96c2c66affSColin Finck /* One more f-key */
97c2c66affSColin Finck VK_F24,
98c2c66affSColin Finck /* - 77 - */
99c2c66affSColin Finck VK_EMPTY, VK_EMPTY, VK_EMPTY, VK_EMPTY,
100c2c66affSColin Finck VK_EMPTY, VK_EMPTY, VK_EMPTY, VK_EMPTY, /* PA1 */
101c2c66affSColin Finck };
102c2c66affSColin Finck
103c2c66affSColin Finck ROSDATA VSC_VK extcode0_to_vk[] = {
104c2c66affSColin Finck { 0x10, VK_MEDIA_PREV_TRACK | KBDEXT },
105c2c66affSColin Finck { 0x19, VK_MEDIA_NEXT_TRACK | KBDEXT },
106c2c66affSColin Finck { 0x1D, VK_RCONTROL | KBDEXT },
107c2c66affSColin Finck { 0x20, VK_VOLUME_MUTE | KBDEXT },
108c2c66affSColin Finck { 0x21, VK_LAUNCH_APP2 | KBDEXT },
109c2c66affSColin Finck { 0x22, VK_MEDIA_PLAY_PAUSE | KBDEXT },
110c2c66affSColin Finck { 0x24, VK_MEDIA_STOP | KBDEXT },
111c2c66affSColin Finck { 0x2E, VK_VOLUME_DOWN | KBDEXT },
112c2c66affSColin Finck { 0x30, VK_VOLUME_UP | KBDEXT },
113c2c66affSColin Finck { 0x32, VK_BROWSER_HOME | KBDEXT },
114c2c66affSColin Finck { 0x35, VK_DIVIDE | KBDEXT },
115c2c66affSColin Finck { 0x37, VK_SNAPSHOT | KBDEXT },
116c2c66affSColin Finck { 0x38, VK_RMENU | KBDEXT },
117c2c66affSColin Finck { 0x47, VK_HOME | KBDEXT },
118c2c66affSColin Finck { 0x48, VK_UP | KBDEXT },
119c2c66affSColin Finck { 0x49, VK_PRIOR | KBDEXT },
120c2c66affSColin Finck { 0x4B, VK_LEFT | KBDEXT },
121c2c66affSColin Finck { 0x4D, VK_RIGHT | KBDEXT },
122c2c66affSColin Finck { 0x4F, VK_END | KBDEXT },
123c2c66affSColin Finck { 0x50, VK_DOWN | KBDEXT },
124c2c66affSColin Finck { 0x51, VK_NEXT | KBDEXT },
125c2c66affSColin Finck { 0x52, VK_INSERT | KBDEXT },
126c2c66affSColin Finck { 0x53, VK_DELETE | KBDEXT },
127c2c66affSColin Finck { 0x5B, VK_LWIN | KBDEXT },
128c2c66affSColin Finck { 0x5C, VK_RWIN | KBDEXT },
129c2c66affSColin Finck { 0x5D, VK_APPS | KBDEXT },
130c2c66affSColin Finck { 0x5F, VK_SLEEP | KBDEXT },
131c2c66affSColin Finck { 0x65, VK_BROWSER_SEARCH | KBDEXT },
132c2c66affSColin Finck { 0x66, VK_BROWSER_FAVORITES | KBDEXT },
133c2c66affSColin Finck { 0x67, VK_BROWSER_REFRESH | KBDEXT },
134c2c66affSColin Finck { 0x68, VK_BROWSER_STOP | KBDEXT },
135c2c66affSColin Finck { 0x69, VK_BROWSER_FORWARD | KBDEXT },
136c2c66affSColin Finck { 0x6A, VK_BROWSER_BACK | KBDEXT },
137c2c66affSColin Finck { 0x6B, VK_LAUNCH_APP1 | KBDEXT },
138c2c66affSColin Finck { 0x6C, VK_LAUNCH_MAIL | KBDEXT },
139c2c66affSColin Finck { 0x6D, VK_LAUNCH_MEDIA_SELECT | KBDEXT },
140c2c66affSColin Finck { 0x1C, VK_RETURN | KBDEXT },
141c2c66affSColin Finck { 0x46, VK_CANCEL | KBDEXT },
142c2c66affSColin Finck { 0, 0 },
143c2c66affSColin Finck };
144c2c66affSColin Finck
145c2c66affSColin Finck ROSDATA VSC_VK extcode1_to_vk[] = {
146c2c66affSColin Finck { 0x1d, VK_PAUSE},
147c2c66affSColin Finck { 0, 0 },
148c2c66affSColin Finck };
149c2c66affSColin Finck
150c2c66affSColin Finck ROSDATA VK_TO_BIT modifier_keys[] = {
151c2c66affSColin Finck { VK_SHIFT, KBDSHIFT },
152c2c66affSColin Finck { VK_CONTROL, KBDCTRL },
153c2c66affSColin Finck { VK_MENU, KBDALT },
154c2c66affSColin Finck { 0, 0 }
155c2c66affSColin Finck };
156c2c66affSColin Finck
157c2c66affSColin Finck ROSDATA MODIFIERS modifier_bits = {
158c2c66affSColin Finck modifier_keys,
159c2c66affSColin Finck 6,
160c2c66affSColin Finck { 0, 1, 3, 4, SHFT_INVALID, SHFT_INVALID, 2 } /* Modifier bit order, NONE, SHIFT, CTRL, ALT, MENU, SHIFT + MENU, CTRL + MENU */
161c2c66affSColin Finck };
162c2c66affSColin Finck
163c2c66affSColin Finck ROSDATA VK_TO_WCHARS2 key_to_chars_2mod[] = {
164c2c66affSColin Finck { VK_OEM_5, 0, {WCH_DEAD, 0xb0} },
165c2c66affSColin Finck { 0xff, 0, {'^', WCH_NONE} }, // FIXME - why doesn't this work?
166c2c66affSColin Finck /* Normal vs Shifted */
167c2c66affSColin Finck /* The numbers */
168c2c66affSColin Finck { '1', 0, {'1', '!'} },
169c2c66affSColin Finck /* Ctrl-2 generates NUL */
170c2c66affSColin Finck { '4', 0, {'4', '$'} },
171c2c66affSColin Finck { '5', 0, {'5', '%'} },
172c2c66affSColin Finck
173c2c66affSColin Finck { VK_OEM_6, 0, {WCH_DEAD, WCH_DEAD} },
174c2c66affSColin Finck { 0xff, 0, {0xb4, '`'} },
175c2c66affSColin Finck
176c2c66affSColin Finck /* First letter row */
177c2c66affSColin Finck { 'W', CAPLOK, {'w', 'W'} },
178c2c66affSColin Finck { 'R', CAPLOK, {'r', 'R'} },
179c2c66affSColin Finck { 'T', CAPLOK, {'t', 'T'} },
180c2c66affSColin Finck { 'Z', CAPLOK, {'z', 'Z'} },
181c2c66affSColin Finck { 'U', CAPLOK, {'u', 'U'} },
182c2c66affSColin Finck { 'I', CAPLOK, {'i', 'I'} },
183c2c66affSColin Finck { 'O', CAPLOK, {'o', 'O'} },
184c2c66affSColin Finck { 'P', CAPLOK, {'p', 'P'} },
185c2c66affSColin Finck /* Second letter row */
186c2c66affSColin Finck { 'A', CAPLOK, {'a', 'A'} },
187c2c66affSColin Finck { 'S', CAPLOK, {'s', 'S'} },
188c2c66affSColin Finck { 'D', CAPLOK, {'d', 'D'} },
189c2c66affSColin Finck { 'F', CAPLOK, {'f', 'F'} },
190c2c66affSColin Finck { 'G', CAPLOK, {'g', 'G'} },
191c2c66affSColin Finck { 'H', CAPLOK, {'h', 'H'} },
192c2c66affSColin Finck { 'J', CAPLOK, {'j', 'J'} },
193c2c66affSColin Finck { 'K', CAPLOK, {'k', 'K'} },
194c2c66affSColin Finck { 'L', CAPLOK, {'l', 'L'} },
195c2c66affSColin Finck { VK_OEM_3, CAPLOK, {0xf6, 0xd6} },
196c2c66affSColin Finck { VK_OEM_7, CAPLOK, {0xe4, 0xc4} },
197c2c66affSColin Finck /* Third letter row */
198c2c66affSColin Finck { 'Y', CAPLOK, {'y', 'Y'} },
199c2c66affSColin Finck { 'X', CAPLOK, {'x', 'X'} },
200c2c66affSColin Finck { 'C', CAPLOK, {'c', 'C'} },
201c2c66affSColin Finck { 'V', CAPLOK, {'v', 'V'} },
202c2c66affSColin Finck { 'B', CAPLOK, {'b', 'B'} },
203c2c66affSColin Finck { 'N', CAPLOK, {'n', 'N'} },
204c2c66affSColin Finck
205c2c66affSColin Finck /* Specials */
206c2c66affSColin Finck { VK_OEM_COMMA, CAPLOK, {',', ';'} },
207c2c66affSColin Finck { VK_OEM_PERIOD, CAPLOK, {'.', ':'} },
208c2c66affSColin Finck { VK_DECIMAL, 0, {',',','} },
209c2c66affSColin Finck { VK_TAB, 0, {'\t', '\t'} },
210c2c66affSColin Finck { VK_ADD, 0, {'+', '+'} },
211c2c66affSColin Finck { VK_DIVIDE, 0, {'/', '/'} },
212c2c66affSColin Finck { VK_MULTIPLY, 0, {'*', '*'} },
213c2c66affSColin Finck { VK_SUBTRACT, 0, {'-', '-'} },
214c2c66affSColin Finck { 0, 0 }
215c2c66affSColin Finck };
216c2c66affSColin Finck
217c2c66affSColin Finck ROSDATA VK_TO_WCHARS3 key_to_chars_3mod[] = {
218c2c66affSColin Finck /* Normal, Shifted, Ctrl */
219c2c66affSColin Finck /* Legacy (telnet-style) ascii escapes */
220c2c66affSColin Finck { '3', CAPLOK, {'3', 0xa7, 0xb3} },
221c2c66affSColin Finck { '7', CAPLOK, {'7', '/', '{'} },
222c2c66affSColin Finck { '8', CAPLOK, {'8', '(', '['} },
223c2c66affSColin Finck { '9', CAPLOK, {'9', ')', ']'} },
224c2c66affSColin Finck { '0', CAPLOK, {'0', '=', '}'} },
225c2c66affSColin Finck { VK_OEM_4, CAPLOK, {0xdf, '?', '\\'} },
226c2c66affSColin Finck { 'Q', CAPLOK, {'q', 'Q', '@'} },
227c2c66affSColin Finck { 'E', CAPLOK, {'e', 'E', 0x20ac} },
228c2c66affSColin Finck { 'M', CAPLOK, {'m', 'M', 0xb5} },
229c2c66affSColin Finck { VK_OEM_102, 0, {'<', '>', '|'} }, // FIXME - why doesn't this work?
230c2c66affSColin Finck { 0,0 }
231c2c66affSColin Finck };
232c2c66affSColin Finck
233c2c66affSColin Finck ROSDATA VK_TO_WCHARS4 key_to_chars_4mod[] = {
234c2c66affSColin Finck /* Normal, Shifted, Ctrl, C-S-x */
235c2c66affSColin Finck /* Legacy Ascii generators */
236c2c66affSColin Finck { VK_OEM_1, CAPLOK, {0xfc, 0xdc, WCH_NONE, 0x1b} },
237c2c66affSColin Finck { VK_OEM_PLUS, CAPLOK, {'+', '*', '~', 0x1d} },
238c2c66affSColin Finck { VK_OEM_2, CAPLOK, {'#', '\'', WCH_NONE, 0x1c} },
239c2c66affSColin Finck { VK_BACK, 0, {'\b', '\b', WCH_NONE, 0x7f} },
240c2c66affSColin Finck { VK_ESCAPE, 0, {0x1b, 0x1b, WCH_NONE, 0x1b} },
241c2c66affSColin Finck { VK_RETURN, 0, {'\r', '\r', WCH_NONE, '\n'} },
242c2c66affSColin Finck { VK_SPACE, 0, {' ', ' ', WCH_NONE, ' '} },
243c2c66affSColin Finck { VK_CANCEL, 0, {0x03, 0x03, WCH_NONE, 0x03} },
244c2c66affSColin Finck { 0, 0 }
245c2c66affSColin Finck };
246c2c66affSColin Finck
247c2c66affSColin Finck ROSDATA VK_TO_WCHARS5 key_to_chars_5mod[] = {
248c2c66affSColin Finck /* Normal, Shifted, Ctrl, C-S-x */
249c2c66affSColin Finck { '2', CAPLOK, {'2', '\"', 0xb2, WCH_NONE, 0x00} },
250c2c66affSColin Finck { '6', CAPLOK, {'6', '&', WCH_NONE, WCH_NONE, 0x1e} },
251c2c66affSColin Finck { VK_OEM_MINUS, 0, {'-', '_', WCH_NONE, WCH_NONE, 0x1f} },
252c2c66affSColin Finck { 0, 0 }
253c2c66affSColin Finck };
254c2c66affSColin Finck
255c2c66affSColin Finck ROSDATA VK_TO_WCHARS1 keypad_numbers[] = {
256c2c66affSColin Finck { VK_DECIMAL, 0, {'.'} },
257c2c66affSColin Finck { VK_NUMPAD0, 0, {'0'} },
258c2c66affSColin Finck { VK_NUMPAD1, 0, {'1'} },
259c2c66affSColin Finck { VK_NUMPAD2, 0, {'2'} },
260c2c66affSColin Finck { VK_NUMPAD3, 0, {'3'} },
261c2c66affSColin Finck { VK_NUMPAD4, 0, {'4'} },
262c2c66affSColin Finck { VK_NUMPAD5, 0, {'5'} },
263c2c66affSColin Finck { VK_NUMPAD6, 0, {'6'} },
264c2c66affSColin Finck { VK_NUMPAD7, 0, {'7'} },
265c2c66affSColin Finck { VK_NUMPAD8, 0, {'8'} },
266c2c66affSColin Finck { VK_NUMPAD9, 0, {'9'} },
267c2c66affSColin Finck // { VK_BACK, 0, '\010' },
268c2c66affSColin Finck { 0,0 }
269c2c66affSColin Finck };
270c2c66affSColin Finck
271c2c66affSColin Finck #define vk_master(n,x) { (PVK_TO_WCHARS1)x, n, sizeof(x[0]) }
272c2c66affSColin Finck
273c2c66affSColin Finck ROSDATA VK_TO_WCHAR_TABLE vk_to_wchar_master_table[] = {
274c2c66affSColin Finck vk_master(3,key_to_chars_3mod),
275c2c66affSColin Finck vk_master(4,key_to_chars_4mod),
276c2c66affSColin Finck vk_master(5,key_to_chars_5mod),
277c2c66affSColin Finck vk_master(2,key_to_chars_2mod),
278c2c66affSColin Finck vk_master(1,keypad_numbers),
279c2c66affSColin Finck { 0,0,0 }
280c2c66affSColin Finck };
281c2c66affSColin Finck
282c2c66affSColin Finck ROSDATA VSC_LPWSTR key_names[] = {
283c2c66affSColin Finck { 0x00, L"" },
284c2c66affSColin Finck { 0x01, L"Esc" },
285c2c66affSColin Finck { 0x0e, L"R\x00fc" L"ck" },
286c2c66affSColin Finck { 0x0f, L"Tabulator" },
287c2c66affSColin Finck { 0x1c, L"Eingabe" },
288c2c66affSColin Finck { 0x1d, L"Strg" },
289c2c66affSColin Finck { 0x2a, L"Umschalt" },
290c2c66affSColin Finck { 0x36, L"Umschalt Rechts" },
291c2c66affSColin Finck { 0x37, L" (Zehnertastatur)" },
292c2c66affSColin Finck { 0x38, L"Alt" },
293c2c66affSColin Finck { 0x39, L"Leer" },
294c2c66affSColin Finck { 0x3a, L"Feststell" },
295c2c66affSColin Finck { 0x3b, L"F1" },
296c2c66affSColin Finck { 0x3c, L"F2" },
297c2c66affSColin Finck { 0x3d, L"F3" },
298c2c66affSColin Finck { 0x3e, L"F4" },
299c2c66affSColin Finck { 0x3f, L"F5" },
300c2c66affSColin Finck { 0x40, L"F6" },
301c2c66affSColin Finck { 0x41, L"F7" },
302c2c66affSColin Finck { 0x42, L"F8" },
303c2c66affSColin Finck { 0x43, L"F9" },
304c2c66affSColin Finck { 0x44, L"F10" },
305c2c66affSColin Finck { 0x45, L"Pause" },
306c2c66affSColin Finck { 0x46, L"Rollen-Feststell" },
307c2c66affSColin Finck { 0x47, L"7 (Zehnertastatur)" },
308c2c66affSColin Finck { 0x48, L"8 (Zehnertastatur)" },
309c2c66affSColin Finck { 0x49, L"9 (Zehnertastatur)" },
310c2c66affSColin Finck { 0x4a, L"- (Zehnertastatur)" },
311c2c66affSColin Finck { 0x4b, L"4 (Zehnertastatur)" },
312c2c66affSColin Finck { 0x4c, L"5 (Zehnertastatur)" },
313c2c66affSColin Finck { 0x4d, L"6 (Zehnertastatur)" },
314c2c66affSColin Finck { 0x4e, L"+ (Zehnertastatur)" },
315c2c66affSColin Finck { 0x4f, L"1 (Zehnertastatur)" },
316c2c66affSColin Finck { 0x50, L"2 (Zehnertastatur)" },
317c2c66affSColin Finck { 0x51, L"3 (Zehnertastatur)" },
318c2c66affSColin Finck { 0x52, L"0 (Zehnertastatur)" },
319c2c66affSColin Finck { 0x53, L"Komma (Zehnertastatur)" },
320c2c66affSColin Finck { 0x54, L"Sys Req" },
321c2c66affSColin Finck { 0x57, L"F11" },
322c2c66affSColin Finck { 0x58, L"F12" },
323c2c66affSColin Finck { 0x7c, L"F13" },
324c2c66affSColin Finck { 0x7d, L"F14" },
325c2c66affSColin Finck { 0x7e, L"F15" },
326c2c66affSColin Finck { 0x7f, L"F16" },
327c2c66affSColin Finck { 0x80, L"F17" },
328c2c66affSColin Finck { 0x81, L"F18" },
329c2c66affSColin Finck { 0x82, L"F19" },
330c2c66affSColin Finck { 0x83, L"F20" },
331c2c66affSColin Finck { 0x84, L"F21" },
332c2c66affSColin Finck { 0x85, L"F22" },
333c2c66affSColin Finck { 0x86, L"F23" },
334c2c66affSColin Finck { 0x87, L"F24" },
335c2c66affSColin Finck { 0, NULL },
336c2c66affSColin Finck };
337c2c66affSColin Finck
338c2c66affSColin Finck ROSDATA VSC_LPWSTR extended_key_names[] = {
339c2c66affSColin Finck { 0x1c, L"Eingabe (Zehnertastatur" },
340c2c66affSColin Finck { 0x1d, L"Strg-Rechts" },
341c2c66affSColin Finck { 0x35, L" (Zehnertastatur)" },
342c2c66affSColin Finck { 0x37, L"Druck" },
343c2c66affSColin Finck { 0x38, L"Alt Gr" },
344c2c66affSColin Finck { 0x45, L"Num-Feststell" },
345c2c66affSColin Finck { 0x46, L"Untbr" },
346c2c66affSColin Finck { 0x47, L"Pos1" },
347c2c66affSColin Finck { 0x48, L"Nach-Oben" },
348c2c66affSColin Finck { 0x49, L"Bild-Nach-Oben" },
349c2c66affSColin Finck { 0x4b, L"Nach-Links" },
350c2c66affSColin Finck //{ 0x4c, L"Center" },
351c2c66affSColin Finck { 0x4d, L"Nach-Rechts" },
352c2c66affSColin Finck { 0x4f, L"Ende" },
353c2c66affSColin Finck { 0x50, L"Nach-Unten" },
354c2c66affSColin Finck { 0x51, L"Bild-Nach-Unten" },
355c2c66affSColin Finck { 0x52, L"Einfg" },
356c2c66affSColin Finck { 0x53, L"Entf" },
357c2c66affSColin Finck { 0x54, L"<ReactOS>" },
358c2c66affSColin Finck { 0x55, L"Hilfe" },
359c2c66affSColin Finck { 0x56, L"Linke <ReactOS>" },
360c2c66affSColin Finck { 0x5b, L"Rechte <ReactOS>" },
361c2c66affSColin Finck { 0, NULL },
362c2c66affSColin Finck };
363c2c66affSColin Finck
364c2c66affSColin Finck ROSDATA DEADKEY_LPWSTR dead_key_names[] = {
365c2c66affSColin Finck L"\x00b4" L"Akut",
366c2c66affSColin Finck L"`" L"Gravis",
367c2c66affSColin Finck L"^" L"Zirkumflex",
368c2c66affSColin Finck NULL
369c2c66affSColin Finck };
370c2c66affSColin Finck
371c2c66affSColin Finck #define DEADTRANS(ch, accent, comp, flags) MAKELONG(ch, accent), comp, flags
372c2c66affSColin Finck
373c2c66affSColin Finck ROSDATA DEADKEY dead_key[] = {
374c2c66affSColin Finck { DEADTRANS(L'a', L'^', 0xe2, 0x00) },
375c2c66affSColin Finck { DEADTRANS(L'e', L'^', 0xea, 0x00) },
376c2c66affSColin Finck { DEADTRANS(L'i', L'^', 0xee, 0x00) },
377c2c66affSColin Finck { DEADTRANS(L'o', L'^', 0xf4, 0x00) },
378c2c66affSColin Finck { DEADTRANS(L'u', L'^', 0xfb, 0x00) },
379c2c66affSColin Finck { DEADTRANS(L'A', L'^', 0xc2, 0x00) },
380c2c66affSColin Finck { DEADTRANS(L'E', L'^', 0xca, 0x00) },
381c2c66affSColin Finck { DEADTRANS(L'I', L'^', 0xce, 0x00) },
382c2c66affSColin Finck { DEADTRANS(L'O', L'^', 0xd4, 0x00) },
383c2c66affSColin Finck { DEADTRANS(L'U', L'^', 0xdb, 0x00) },
384c2c66affSColin Finck { DEADTRANS(L' ', L'^', L'^', 0x00) },
385c2c66affSColin Finck { DEADTRANS(L'a', 0xb4, 0xe1, 0x00) },
386c2c66affSColin Finck { DEADTRANS(L'e', 0xb4, 0xe9, 0x00) },
387c2c66affSColin Finck { DEADTRANS(L'i', 0xb4, 0xed, 0x00) },
388c2c66affSColin Finck { DEADTRANS(L'o', 0xb4, 0xf3, 0x00) },
389c2c66affSColin Finck { DEADTRANS(L'u', 0xb4, 0xfa, 0x00) },
390c2c66affSColin Finck { DEADTRANS(L'y', 0xb4, 0xfd, 0x00) },
391c2c66affSColin Finck { DEADTRANS(L'A', 0xb4, 0xc1, 0x00) },
392c2c66affSColin Finck { DEADTRANS(L'E', 0xb4, 0xc9, 0x00) },
393c2c66affSColin Finck { DEADTRANS(L'I', 0xb4, 0xcd, 0x00) },
394c2c66affSColin Finck { DEADTRANS(L'O', 0xb4, 0xd3, 0x00) },
395c2c66affSColin Finck { DEADTRANS(L'U', 0xb4, 0xda, 0x00) },
396c2c66affSColin Finck { DEADTRANS(L'Y', 0xb4, 0xdd, 0x00) },
397c2c66affSColin Finck { DEADTRANS(L' ', 0xb4, 0xb4, 0x00) },
398c2c66affSColin Finck { DEADTRANS(L'a', L'`', 0xe0, 0x00) },
399c2c66affSColin Finck { DEADTRANS(L'e', L'`', 0xe8, 0x00) },
400c2c66affSColin Finck { DEADTRANS(L'i', L'`', 0xec, 0x00) },
401c2c66affSColin Finck { DEADTRANS(L'o', L'`', 0xf2, 0x00) },
402c2c66affSColin Finck { DEADTRANS(L'u', L'`', 0xf9, 0x00) },
403c2c66affSColin Finck { DEADTRANS(L'A', L'`', 0xc0, 0x00) },
404c2c66affSColin Finck { DEADTRANS(L'E', L'`', 0xc8, 0x00) },
405c2c66affSColin Finck { DEADTRANS(L'I', L'`', 0xcc, 0x00) },
406c2c66affSColin Finck { DEADTRANS(L'O', L'`', 0xd2, 0x00) },
407c2c66affSColin Finck { DEADTRANS(L'U', L'`', 0xd9, 0x00) },
408c2c66affSColin Finck { DEADTRANS(L' ', L'`', L'`', 0x00) },
409c2c66affSColin Finck { 0, 0 }
410c2c66affSColin Finck };
411c2c66affSColin Finck
412c2c66affSColin Finck /* Finally, the master table */
413c2c66affSColin Finck ROSDATA KBDTABLES keyboard_layout_table = {
414c2c66affSColin Finck /* modifier assignments */
415c2c66affSColin Finck &modifier_bits,
416c2c66affSColin Finck
417c2c66affSColin Finck /* character from vk tables */
418c2c66affSColin Finck vk_to_wchar_master_table,
419c2c66affSColin Finck
420c2c66affSColin Finck /* diacritical marks -- currently implemented by wine code */
421c2c66affSColin Finck dead_key,
422c2c66affSColin Finck
423c2c66affSColin Finck /* Key names */
424c2c66affSColin Finck (VSC_LPWSTR *)key_names,
425c2c66affSColin Finck (VSC_LPWSTR *)extended_key_names,
426c2c66affSColin Finck dead_key_names, /* Dead key names */
427c2c66affSColin Finck
428c2c66affSColin Finck /* scan code to virtual key maps */
429c2c66affSColin Finck scancode_to_vk,
430*cdf90707SStanislav Motylkov RTL_NUMBER_OF(scancode_to_vk),
431c2c66affSColin Finck extcode0_to_vk,
432c2c66affSColin Finck extcode1_to_vk,
433c2c66affSColin Finck
434c2c66affSColin Finck MAKELONG(KLLF_ALTGR, 1), /* Version 1.0 */
435c2c66affSColin Finck
436c2c66affSColin Finck /* Ligatures -- German doesn't have any */
437c2c66affSColin Finck 0,
438c2c66affSColin Finck 0,
439c2c66affSColin Finck NULL
440c2c66affSColin Finck };
441c2c66affSColin Finck
KbdLayerDescriptor(VOID)442c2c66affSColin Finck PKBDTABLES WINAPI KbdLayerDescriptor(VOID) {
443c2c66affSColin Finck return &keyboard_layout_table;
444c2c66affSColin Finck }
445c2c66affSColin Finck
446