1c2c66affSColin Finck /*
2c2c66affSColin Finck * ReactOS Hebrew Keyboard layout
3c2c66affSColin Finck * Copyright (C) 2005 - 2013 ReactOS
4c2c66affSColin Finck * License: LGPL, see: LGPL.txt
5c2c66affSColin Finck * Authors: Royce Mitchell III
6c2c66affSColin Finck * Baruch Rutman 2013
7c2c66affSColin Finck *
8c2c66affSColin Finck * Thanks to: http://www.barcodeman.com/altek/mule/scandoc.php
9c2c66affSColin Finck * and http://win.tue.nl/~aeb/linux/kbd/scancodes-1.html
10c2c66affSColin Finck */
11c2c66affSColin Finck
12c2c66affSColin Finck #define WIN32_NO_STATUS
13c2c66affSColin Finck #include <stdarg.h>
14c2c66affSColin Finck #include <windef.h>
15c2c66affSColin Finck #include <winuser.h>
16c2c66affSColin Finck #include <ndk/kbd.h>
17c2c66affSColin Finck
18c2c66affSColin Finck #ifdef _MSC_VER
19c2c66affSColin Finck #ifndef WINAPI
20c2c66affSColin Finck #define WINAPI __stdcall
21c2c66affSColin Finck #endif
22c2c66affSColin Finck #endif//_MSC_VER
23c2c66affSColin Finck
24c2c66affSColin Finck #ifdef _M_IA64
25c2c66affSColin Finck #define ROSDATA static __declspec(allocate(".data"))
26c2c66affSColin Finck #else
27c2c66affSColin Finck #ifdef _MSC_VER
28c2c66affSColin Finck #pragma data_seg(".data")
29c2c66affSColin Finck #define ROSDATA static
30c2c66affSColin Finck #else
31c2c66affSColin Finck #define ROSDATA static __attribute__((section(".data")))
32c2c66affSColin Finck #endif
33c2c66affSColin Finck #endif
34c2c66affSColin Finck
35c2c66affSColin Finck #define VK_EMPTY 0xff /* The non-existent VK */
36c2c66affSColin Finck
37c2c66affSColin Finck #define KNUMS KBDNUMPAD|KBDSPECIAL /* Special + number pad */
38c2c66affSColin Finck #define KMEXT KBDEXT|KBDMULTIVK /* Multi + ext */
39c2c66affSColin Finck
40c2c66affSColin Finck enum
41c2c66affSColin Finck {
42c2c66affSColin Finck // vowels, etc
43c2c66affSColin Finck SHEVA = 0x5B0,
44c2c66affSColin Finck HATAF_SEGOL,
45c2c66affSColin Finck HATAF_PATAH,
46c2c66affSColin Finck HATAF_QAMATS,
47c2c66affSColin Finck HIRIQ,
48c2c66affSColin Finck TSERE,
49c2c66affSColin Finck SEGOL,
50c2c66affSColin Finck PATAH,
51c2c66affSColin Finck QAMATS,
52c2c66affSColin Finck HOLAM,
53c2c66affSColin Finck QUBUTS = 0x5BB,
54c2c66affSColin Finck DAGESH,
55c2c66affSColin Finck MAPIQ = DAGESH,
56c2c66affSColin Finck METEG,
57c2c66affSColin Finck MAQAF,
58c2c66affSColin Finck RAFE,
59c2c66affSColin Finck PASEQ,
60c2c66affSColin Finck SHIN_DOT,
61c2c66affSColin Finck SIN_DOT,
62c2c66affSColin Finck SOF_PASUQ,
63c2c66affSColin Finck YIDDISH_DOUBLE_VAV = 0x5F0,
64c2c66affSColin Finck YIDDISH_VAV_YUD,
65c2c66affSColin Finck YIDDISH_DOUBLE_YUD,
66c2c66affSColin Finck GERESH,
67c2c66affSColin Finck GERSHAYIM,
68c2c66affSColin Finck
69c2c66affSColin Finck // consonants
70c2c66affSColin Finck ALEF = 0x5D0,
71c2c66affSColin Finck BET,
72c2c66affSColin Finck GIMEL,
73c2c66affSColin Finck DALET,
74c2c66affSColin Finck HEY,
75c2c66affSColin Finck VAV,
76c2c66affSColin Finck ZAYIN,
77c2c66affSColin Finck HET,
78c2c66affSColin Finck TET,
79c2c66affSColin Finck YUD,
80c2c66affSColin Finck KAF_SOFIT,
81c2c66affSColin Finck KAF,
82c2c66affSColin Finck LAMED,
83c2c66affSColin Finck MEM_SOFIT,
84c2c66affSColin Finck MEM,
85c2c66affSColin Finck NUN_SOFIT,
86c2c66affSColin Finck NUN,
87c2c66affSColin Finck SAMEKH,
88c2c66affSColin Finck AYIN,
89c2c66affSColin Finck PEY_SOFIT,
90c2c66affSColin Finck PEY,
91c2c66affSColin Finck TSADI_SOFIT,
92c2c66affSColin Finck TSADI,
93c2c66affSColin Finck QOF,
94c2c66affSColin Finck RESH,
95c2c66affSColin Finck SHIN,
96c2c66affSColin Finck TAV,
97c2c66affSColin Finck
98c2c66affSColin Finck // symbols
99c2c66affSColin Finck SHEQEL = 0x20AA
100c2c66affSColin Finck };
101c2c66affSColin Finck
102c2c66affSColin Finck ROSDATA USHORT scancode_to_vk[] =
103c2c66affSColin Finck {
104c2c66affSColin Finck /* Numbers Row */
105c2c66affSColin Finck
106c2c66affSColin Finck /* - 00 - */
107c2c66affSColin Finck VK_EMPTY, // 00: ?
108c2c66affSColin Finck VK_ESCAPE, // 01: esc
109c2c66affSColin Finck '1', // 02: '1'
110c2c66affSColin Finck '2', // 03: '2'
111c2c66affSColin Finck '3', // 04: '3'
112c2c66affSColin Finck '4', // 05: '4'
113c2c66affSColin Finck '5', // 06: '5'
114c2c66affSColin Finck '6', // 07: '6'
115c2c66affSColin Finck '7', // 08: '7'
116c2c66affSColin Finck '8', // 09: '8'
117c2c66affSColin Finck '9', // 0A: '9'
118c2c66affSColin Finck '0', // 0B: '0'
119c2c66affSColin Finck VK_OEM_MINUS, // 0C: '-'
120c2c66affSColin Finck VK_OEM_PLUS, // OD: '+'
121c2c66affSColin Finck VK_BACK, // OE: backspace
122c2c66affSColin Finck
123c2c66affSColin Finck /* - 0f - */
124c2c66affSColin Finck /* First Letters Row */
125c2c66affSColin Finck VK_TAB, // 0F: tab
126c2c66affSColin Finck VK_OEM_2, // 10: 'Q'
127c2c66affSColin Finck VK_OEM_7, // 11: 'W'
128c2c66affSColin Finck 'E', // 12: 'E'
129c2c66affSColin Finck 'R', // 13: 'R'
130c2c66affSColin Finck 'T', // 14: 'T'
131c2c66affSColin Finck 'Y', // 15: 'Y'
132c2c66affSColin Finck 'U', // 16: 'U'
133c2c66affSColin Finck 'I', // 17: 'I'
134c2c66affSColin Finck 'O', // 18: 'O'
135c2c66affSColin Finck 'P', // 19: 'P'
136c2c66affSColin Finck VK_OEM_4, // 1A: '{'
137c2c66affSColin Finck VK_OEM_6, // 1B: '}'
138c2c66affSColin Finck VK_RETURN, // 1C: enter
139c2c66affSColin Finck
140c2c66affSColin Finck /* - 1d - */
141c2c66affSColin Finck /* Second Letters Row */
142c2c66affSColin Finck VK_LCONTROL, // 1D: lctrl
143c2c66affSColin Finck 'A', // 1E: 'A'
144c2c66affSColin Finck 'S', // 1F: 'S'
145c2c66affSColin Finck 'D', // 20: 'D'
146c2c66affSColin Finck 'F', // 21: 'F'
147c2c66affSColin Finck 'G', // 22: 'G'
148c2c66affSColin Finck 'H', // 23: 'H'
149c2c66affSColin Finck 'J', // 24: 'J'
150c2c66affSColin Finck 'K', // 25: 'K'
151c2c66affSColin Finck 'L', // 26: 'L'
152c2c66affSColin Finck VK_OEM_1, // 27: ';'
153c2c66affSColin Finck VK_OEM_COMMA, // 28: '\''
154c2c66affSColin Finck VK_OEM_3, // 29: ?
155c2c66affSColin Finck VK_LSHIFT, // 2A: lshift
156c2c66affSColin Finck VK_OEM_5, // 2B: ?
157c2c66affSColin Finck
158c2c66affSColin Finck /* - 2c - */
159c2c66affSColin Finck /* Third letters row */
160c2c66affSColin Finck 'Z', // 2C: 'Z'
161c2c66affSColin Finck 'X', // 2D: 'X'
162c2c66affSColin Finck 'C', // 2E: 'C'
163c2c66affSColin Finck 'V', // 2F: 'V'
164c2c66affSColin Finck 'B', // 30: 'B'
165c2c66affSColin Finck 'N', // 31: 'N'
166c2c66affSColin Finck 'M', // 32: 'M'
167c2c66affSColin Finck 'Q', // 33: ','
168c2c66affSColin Finck 'W', // 34: '.'
169c2c66affSColin Finck VK_OEM_PERIOD,// 35: '/'
170c2c66affSColin Finck VK_RSHIFT, // 36: rshift
171c2c66affSColin Finck /* - 37 - */
172c2c66affSColin Finck /* Bottom Row */
173c2c66affSColin Finck VK_MULTIPLY, // 37: ?
174c2c66affSColin Finck VK_LMENU, // 38: lalt
175c2c66affSColin Finck VK_SPACE, // 39: space
176c2c66affSColin Finck VK_CAPITAL, // 3A: CAPLOK lock?
177c2c66affSColin Finck
178c2c66affSColin Finck /* - 3b - */
179c2c66affSColin Finck /* F-Keys */
180c2c66affSColin Finck VK_F1, VK_F2, VK_F3, VK_F4, VK_F5, VK_F6,
181c2c66affSColin Finck VK_F7, VK_F8, VK_F9, VK_F10,
182c2c66affSColin Finck /* - 45 - */
183c2c66affSColin Finck /* Locks */
184c2c66affSColin Finck VK_NUMLOCK | KMEXT,
185c2c66affSColin Finck VK_SCROLL | KBDMULTIVK,
186c2c66affSColin Finck /* - 47 - */
187c2c66affSColin Finck /* Number-Pad */
188c2c66affSColin Finck VK_HOME | KNUMS, VK_UP | KNUMS, VK_PRIOR | KNUMS, VK_SUBTRACT,
189c2c66affSColin Finck VK_LEFT | KNUMS, VK_CLEAR | KNUMS, VK_RIGHT | KNUMS, VK_ADD,
190c2c66affSColin Finck VK_END | KNUMS, VK_DOWN | KNUMS, VK_NEXT | KNUMS,
191c2c66affSColin Finck VK_INSERT | KNUMS, VK_DELETE | KNUMS,
192c2c66affSColin Finck /* - 54 - */
193c2c66affSColin Finck /* Presumably PrtSc */
194c2c66affSColin Finck VK_SNAPSHOT,
195c2c66affSColin Finck /* - 55 - */
196c2c66affSColin Finck /* Oddities, and the remaining standard F-Keys */
197c2c66affSColin Finck VK_EMPTY, VK_EMPTY, VK_F11, VK_F12,
198c2c66affSColin Finck /* - 59 - */
199c2c66affSColin Finck VK_CLEAR, VK_EMPTY, VK_EMPTY, VK_EMPTY, VK_EMPTY, /* EREOF */
200c2c66affSColin Finck VK_EMPTY, VK_EMPTY, VK_EMPTY, VK_EMPTY, VK_EMPTY, /* ZOOM */
201c2c66affSColin Finck VK_HELP,
202c2c66affSColin Finck /* - 64 - */
203c2c66affSColin Finck /* Even more F-Keys (for example, NCR keyboards from the early 90's) */
204c2c66affSColin Finck VK_F13, VK_F14, VK_F15, VK_F16, VK_F17, VK_F18, VK_F19, VK_F20,
205c2c66affSColin Finck VK_F21, VK_F22, VK_F23,
206c2c66affSColin Finck /* - 6f - */
207c2c66affSColin Finck /* Not sure who uses these codes */
208c2c66affSColin Finck VK_EMPTY, VK_EMPTY, VK_EMPTY,
209c2c66affSColin Finck /* - 72 - */
210c2c66affSColin Finck VK_EMPTY, VK_EMPTY, VK_EMPTY, VK_EMPTY,
211c2c66affSColin Finck /* - 76 - */
212c2c66affSColin Finck /* One more f-key */
213c2c66affSColin Finck VK_F24,
214c2c66affSColin Finck /* - 77 - */
215c2c66affSColin Finck VK_EMPTY, VK_EMPTY, VK_EMPTY, VK_EMPTY,
216c2c66affSColin Finck VK_EMPTY, VK_EMPTY, VK_EMPTY, VK_EMPTY, /* PA1 */
217c2c66affSColin Finck };
218c2c66affSColin Finck
219c2c66affSColin Finck ROSDATA VSC_VK extcode0_to_vk[] = {
220c2c66affSColin Finck { 0x10, VK_MEDIA_PREV_TRACK | KBDEXT },
221c2c66affSColin Finck { 0x19, VK_MEDIA_NEXT_TRACK | KBDEXT },
222c2c66affSColin Finck { 0x1D, VK_RCONTROL | KBDEXT },
223c2c66affSColin Finck { 0x20, VK_VOLUME_MUTE | KBDEXT },
224c2c66affSColin Finck { 0x21, VK_LAUNCH_APP2 | KBDEXT },
225c2c66affSColin Finck { 0x22, VK_MEDIA_PLAY_PAUSE | KBDEXT },
226c2c66affSColin Finck { 0x24, VK_MEDIA_STOP | KBDEXT },
227c2c66affSColin Finck { 0x2E, VK_VOLUME_DOWN | KBDEXT },
228c2c66affSColin Finck { 0x30, VK_VOLUME_UP | KBDEXT },
229c2c66affSColin Finck { 0x32, VK_BROWSER_HOME | KBDEXT },
230c2c66affSColin Finck { 0x35, VK_DIVIDE | KBDEXT },
231c2c66affSColin Finck { 0x37, VK_SNAPSHOT | KBDEXT },
232c2c66affSColin Finck { 0x38, VK_RMENU | KBDEXT },
233c2c66affSColin Finck { 0x47, VK_HOME | KBDEXT },
234c2c66affSColin Finck { 0x48, VK_UP | KBDEXT },
235c2c66affSColin Finck { 0x49, VK_PRIOR | KBDEXT },
236c2c66affSColin Finck { 0x4B, VK_LEFT | KBDEXT },
237c2c66affSColin Finck { 0x4D, VK_RIGHT | KBDEXT },
238c2c66affSColin Finck { 0x4F, VK_END | KBDEXT },
239c2c66affSColin Finck { 0x50, VK_DOWN | KBDEXT },
240c2c66affSColin Finck { 0x51, VK_NEXT | KBDEXT },
241c2c66affSColin Finck { 0x52, VK_INSERT | KBDEXT },
242c2c66affSColin Finck { 0x53, VK_DELETE | KBDEXT },
243c2c66affSColin Finck { 0x5B, VK_LWIN | KBDEXT },
244c2c66affSColin Finck { 0x5C, VK_RWIN | KBDEXT },
245c2c66affSColin Finck { 0x5D, VK_APPS | KBDEXT },
246c2c66affSColin Finck { 0x5F, VK_SLEEP | KBDEXT },
247c2c66affSColin Finck { 0x65, VK_BROWSER_SEARCH | KBDEXT },
248c2c66affSColin Finck { 0x66, VK_BROWSER_FAVORITES | KBDEXT },
249c2c66affSColin Finck { 0x67, VK_BROWSER_REFRESH | KBDEXT },
250c2c66affSColin Finck { 0x68, VK_BROWSER_STOP | KBDEXT },
251c2c66affSColin Finck { 0x69, VK_BROWSER_FORWARD | KBDEXT },
252c2c66affSColin Finck { 0x6A, VK_BROWSER_BACK | KBDEXT },
253c2c66affSColin Finck { 0x6B, VK_LAUNCH_APP1 | KBDEXT },
254c2c66affSColin Finck { 0x6C, VK_LAUNCH_MAIL | KBDEXT },
255c2c66affSColin Finck { 0x6D, VK_LAUNCH_MEDIA_SELECT | KBDEXT },
256c2c66affSColin Finck { 0x1C, VK_RETURN | KBDEXT },
257c2c66affSColin Finck { 0x46, VK_CANCEL | KBDEXT },
258c2c66affSColin Finck { 0, 0 },
259c2c66affSColin Finck };
260c2c66affSColin Finck
261c2c66affSColin Finck ROSDATA VSC_VK extcode1_to_vk[] = {
262c2c66affSColin Finck { 0x1d, VK_PAUSE },
263c2c66affSColin Finck { 0, 0 },
264c2c66affSColin Finck };
265c2c66affSColin Finck
266c2c66affSColin Finck ROSDATA VK_TO_BIT modifier_keys[] = {
267c2c66affSColin Finck { VK_SHIFT, KBDSHIFT },
268c2c66affSColin Finck { VK_CONTROL, KBDCTRL },
269c2c66affSColin Finck { VK_MENU, KBDALT },
270c2c66affSColin Finck { 0, 0 }
271c2c66affSColin Finck };
272c2c66affSColin Finck
273c2c66affSColin Finck ROSDATA MODIFIERS modifier_bits = {
274c2c66affSColin Finck modifier_keys,
275c2c66affSColin Finck 3,
276c2c66affSColin Finck { 0, 1, 2, 3 } /* Modifier bit order, NONE, SHIFT, CTRL, ALT */
277c2c66affSColin Finck };
278c2c66affSColin Finck
279c2c66affSColin Finck ROSDATA VK_TO_WCHARS2 key_to_chars_2mod[] = {
280c2c66affSColin Finck /* Normal vs Shifted */
281c2c66affSColin Finck /* The numbers */
282c2c66affSColin Finck { '1', 0, {'1', '!'} },
283c2c66affSColin Finck /* Ctrl-2 generates NUL */
284c2c66affSColin Finck { '3', 0, {'3', '#'} },
285c2c66affSColin Finck { '4', 0, {'4', '$'} },
286c2c66affSColin Finck { '5', 0, {'5', '%'} },
287c2c66affSColin Finck /* Ctrl-6 generates RS */
288c2c66affSColin Finck { '7', 0, {'7', '&'} },
289c2c66affSColin Finck { '8', 0, {'8', '*'} },
290c2c66affSColin Finck { '9', 0, {'9', '('} },
291c2c66affSColin Finck { '0', 0, {'0', ')'} },
292c2c66affSColin Finck
293c2c66affSColin Finck /* Specials */
294c2c66affSColin Finck /* Ctrl-_ generates ? */
295c2c66affSColin Finck { VK_OEM_PLUS, 0, {'=', '+'} },
296c2c66affSColin Finck { VK_OEM_1, 0, {PEY_SOFIT, ':'} },
297c2c66affSColin Finck { 'Q', 0, {TAV, '>'} },
298c2c66affSColin Finck { 'W', 0, {TSADI_SOFIT, '<'} },
299c2c66affSColin Finck { VK_OEM_7, CAPLOK, {'\'','W'} },
300c2c66affSColin Finck { VK_OEM_3, 0, {';', '~'} },
301c2c66affSColin Finck { VK_OEM_COMMA, 0, {',', '\"'} },
302c2c66affSColin Finck { VK_OEM_PERIOD, 0, {'.', '?'} },
303c2c66affSColin Finck { VK_OEM_2, CAPLOK, {'/', 'Q'} },
304c2c66affSColin Finck /* Keys that do not have shift states */
305c2c66affSColin Finck { VK_TAB, 0, {'\t','\t'} },
306c2c66affSColin Finck { VK_ADD, 0, {'+', '+'} },
307c2c66affSColin Finck { VK_SUBTRACT,0, {'-', '-'} },
308c2c66affSColin Finck { VK_MULTIPLY,0, {'*', '*'} },
309c2c66affSColin Finck { VK_DIVIDE, 0, {'/', '/'} },
310c2c66affSColin Finck { VK_ESCAPE, 0, {0x1b,0x1b} },
311c2c66affSColin Finck { VK_SPACE, 0, {' ', ' '} },
312c2c66affSColin Finck { 0, 0 }
313c2c66affSColin Finck };
314c2c66affSColin Finck
315c2c66affSColin Finck ROSDATA VK_TO_WCHARS3 key_to_chars_3mod[] = {
316c2c66affSColin Finck /* Normal, Shifted, Ctrl */
317c2c66affSColin Finck /* Legacy (telnet-style) ascii escapes */
318c2c66affSColin Finck { VK_OEM_4, 0, {'[', '{', 0x1b /* ESC */} },
319c2c66affSColin Finck { VK_OEM_6, 0, {']', '}', 0x1d /* GS */} },
320c2c66affSColin Finck { VK_OEM_5, 0, {'\\','|', 0x1c /* FS */} },
321c2c66affSColin Finck { VK_RETURN,0, {'\r', '\r', '\n'} },
322c2c66affSColin Finck { 0,0 }
323c2c66affSColin Finck };
324c2c66affSColin Finck
325c2c66affSColin Finck ROSDATA VK_TO_WCHARS4 key_to_chars_4mod[] = {
326c2c66affSColin Finck /* Normal, Shifted, Ctrl, C-S-x */
327c2c66affSColin Finck
328c2c66affSColin Finck /* The alphabet */
329c2c66affSColin Finck { 'A', CAPLOK, {SHIN, 'A', 0x01, 0x01} },
330c2c66affSColin Finck { 'B', CAPLOK, {NUN, 'B', 0x02, 0x02} },
331c2c66affSColin Finck { 'C', CAPLOK, {BET, 'C', 0x03, 0x03} },
332c2c66affSColin Finck { 'D', CAPLOK, {GIMEL, 'D', 0x04, 0x04} },
333c2c66affSColin Finck { 'E', CAPLOK, {QOF, 'E', 0x05, 0x05} },
334c2c66affSColin Finck { 'F', CAPLOK, {KAF, 'F', 0x06, 0x06} },
335c2c66affSColin Finck { 'G', CAPLOK, {AYIN, 'G', 0x07, 0x07} },
336c2c66affSColin Finck { 'H', CAPLOK, {YUD, 'H', 0x08, 0x08} },
337c2c66affSColin Finck { 'I', CAPLOK, {NUN_SOFIT, 'I', 0x09, 0x09} },
338c2c66affSColin Finck { 'J', CAPLOK, {HET, 'J', 0x0a, 0x0a} },
339c2c66affSColin Finck { 'K', CAPLOK, {LAMED, 'K', 0x0b, 0x0b} },
340c2c66affSColin Finck { 'L', CAPLOK, {KAF_SOFIT, 'L', 0x0c, 0x0c} },
341c2c66affSColin Finck { 'M', CAPLOK, {TSADI, 'M', 0x0d, 0x0d} },
342c2c66affSColin Finck { 'N', CAPLOK, {MEM, 'N', 0x0e, 0x0e} },
343c2c66affSColin Finck { 'O', CAPLOK, {MEM_SOFIT, 'O', 0x0f, 0x0f} },
344c2c66affSColin Finck { 'P', CAPLOK, {PEY, 'P', 0x10, 0x10} },
345c2c66affSColin Finck { VK_OEM_2, CAPLOK, {'/', 'Q', 0x11, 0x11} },
346c2c66affSColin Finck { 'R', CAPLOK, {RESH, 'R', 0x12, 0x12} },
347c2c66affSColin Finck { 'S', CAPLOK, {DALET, 'S', 0x13, 0x13} },
348c2c66affSColin Finck { 'T', CAPLOK, {ALEF, 'T', 0x14, 0x14} },
349c2c66affSColin Finck { 'U', CAPLOK, {VAV, 'U', 0x15, 0x15} },
350c2c66affSColin Finck { 'V', CAPLOK, {HEY, 'V', 0x16, 0x16} },
351c2c66affSColin Finck { VK_OEM_7, CAPLOK, {'\'', 'W', 0x17, 0x17} },
352c2c66affSColin Finck { 'X', CAPLOK, {SAMEKH, 'X', 0x18, 0x18} },
353c2c66affSColin Finck { 'Y', CAPLOK, {TET, 'Y', 0x19, 0x19} },
354c2c66affSColin Finck { 'Z', CAPLOK, {ZAYIN, 'Z', 0x1a, 0x1a} },
355c2c66affSColin Finck
356c2c66affSColin Finck /* Legacy Ascii generators */
357c2c66affSColin Finck { '2', 0, {'2', '@', WCH_NONE, 0} },
358c2c66affSColin Finck { '6', 0, {'6', '^', WCH_NONE, 0x1e /* RS */} },
359c2c66affSColin Finck { VK_OEM_MINUS, 0, {'-', '_', WCH_NONE, 0x1f /* US */} },
360c2c66affSColin Finck { 0, 0 }
361c2c66affSColin Finck };
362c2c66affSColin Finck
363c2c66affSColin Finck ROSDATA VK_TO_WCHARS1 keypad_numbers[] =
364c2c66affSColin Finck {
365c2c66affSColin Finck { VK_NUMPAD0, 0, {'0'} },
366c2c66affSColin Finck { VK_NUMPAD1, 0, {'1'} },
367c2c66affSColin Finck { VK_NUMPAD2, 0, {'2'} },
368c2c66affSColin Finck { VK_NUMPAD3, 0, {'3'} },
369c2c66affSColin Finck { VK_NUMPAD4, 0, {'4'} },
370c2c66affSColin Finck { VK_NUMPAD5, 0, {'5'} },
371c2c66affSColin Finck { VK_NUMPAD6, 0, {'6'} },
372c2c66affSColin Finck { VK_NUMPAD7, 0, {'7'} },
373c2c66affSColin Finck { VK_NUMPAD8, 0, {'8'} },
374c2c66affSColin Finck { VK_NUMPAD9, 0, {'9'} },
375c2c66affSColin Finck { VK_DECIMAL, 0, {'.'} },
376c2c66affSColin Finck { VK_BACK, 0, {'\010'} },
377c2c66affSColin Finck { 0,0 }
378c2c66affSColin Finck };
379c2c66affSColin Finck
380c2c66affSColin Finck #define vk_master(n,x) { (PVK_TO_WCHARS1)x, n, sizeof(x[0]) }
381c2c66affSColin Finck
382c2c66affSColin Finck ROSDATA VK_TO_WCHAR_TABLE vk_to_wchar_master_table[] =
383c2c66affSColin Finck {
384c2c66affSColin Finck vk_master(1,keypad_numbers),
385c2c66affSColin Finck vk_master(2,key_to_chars_2mod),
386c2c66affSColin Finck vk_master(3,key_to_chars_3mod),
387c2c66affSColin Finck vk_master(4,key_to_chars_4mod),
388c2c66affSColin Finck { 0,0,0 }
389c2c66affSColin Finck };
390c2c66affSColin Finck
391c2c66affSColin Finck ROSDATA VSC_LPWSTR key_names[] =
392c2c66affSColin Finck {
393c2c66affSColin Finck { 0x00, L"" },
394c2c66affSColin Finck { 0x01, L"Esc" },
395c2c66affSColin Finck { 0x0e, L"Backspace" },
396c2c66affSColin Finck { 0x0f, L"Tab" },
397c2c66affSColin Finck { 0x1c, L"Enter" },
398c2c66affSColin Finck { 0x1d, L"Ctrl" },
399c2c66affSColin Finck { 0x2a, L"Shift" },
400c2c66affSColin Finck { 0x36, L"Right Shift" },
401c2c66affSColin Finck { 0x37, L"Num *" },
402c2c66affSColin Finck { 0x38, L"Alt" },
403c2c66affSColin Finck { 0x39, L"Space" },
404c2c66affSColin Finck { 0x3a, L"CAPLOK Lock" },
405c2c66affSColin Finck { 0x3b, L"F1" },
406c2c66affSColin Finck { 0x3c, L"F2" },
407c2c66affSColin Finck { 0x3d, L"F3" },
408c2c66affSColin Finck { 0x3e, L"F4" },
409c2c66affSColin Finck { 0x3f, L"F5" },
410c2c66affSColin Finck { 0x40, L"F6" },
411c2c66affSColin Finck { 0x41, L"F7" },
412c2c66affSColin Finck { 0x42, L"F8" },
413c2c66affSColin Finck { 0x43, L"F9" },
414c2c66affSColin Finck { 0x44, L"F10" },
415c2c66affSColin Finck { 0x45, L"Pause" },
416c2c66affSColin Finck { 0x46, L"Scroll Lock" },
417c2c66affSColin Finck { 0x47, L"Num 7" },
418c2c66affSColin Finck { 0x48, L"Num 8" },
419c2c66affSColin Finck { 0x49, L"Num 9" },
420c2c66affSColin Finck { 0x4a, L"Num -" },
421c2c66affSColin Finck { 0x4b, L"Num 4" },
422c2c66affSColin Finck { 0x4c, L"Num 5" },
423c2c66affSColin Finck { 0x4d, L"Num 6" },
424c2c66affSColin Finck { 0x4e, L"Num +" },
425c2c66affSColin Finck { 0x4f, L"Num 1" },
426c2c66affSColin Finck { 0x50, L"Num 2" },
427c2c66affSColin Finck { 0x51, L"Num 3" },
428c2c66affSColin Finck { 0x52, L"Num 0" },
429c2c66affSColin Finck { 0x53, L"Num Del" },
430c2c66affSColin Finck { 0x54, L"Sys Req" },
431c2c66affSColin Finck { 0x57, L"F11" },
432c2c66affSColin Finck { 0x58, L"F12" },
433c2c66affSColin Finck { 0x7c, L"F13" },
434c2c66affSColin Finck { 0x7d, L"F14" },
435c2c66affSColin Finck { 0x7e, L"F15" },
436c2c66affSColin Finck { 0x7f, L"F16" },
437c2c66affSColin Finck { 0x80, L"F17" },
438c2c66affSColin Finck { 0x81, L"F18" },
439c2c66affSColin Finck { 0x82, L"F19" },
440c2c66affSColin Finck { 0x83, L"F20" },
441c2c66affSColin Finck { 0x84, L"F21" },
442c2c66affSColin Finck { 0x85, L"F22" },
443c2c66affSColin Finck { 0x86, L"F23" },
444c2c66affSColin Finck { 0x87, L"F24" },
445c2c66affSColin Finck { 0, NULL },
446c2c66affSColin Finck };
447c2c66affSColin Finck
448c2c66affSColin Finck ROSDATA VSC_LPWSTR extended_key_names[] =
449c2c66affSColin Finck {
450c2c66affSColin Finck { 0x1c, L"Num Enter" },
451c2c66affSColin Finck { 0x1d, L"Right Ctrl" },
452c2c66affSColin Finck { 0x35, L"Num /" },
453c2c66affSColin Finck { 0x37, L"Prnt Scrn" },
454c2c66affSColin Finck { 0x38, L"Right Alt" },
455c2c66affSColin Finck { 0x45, L"Num Lock" },
456c2c66affSColin Finck { 0x46, L"Break" },
457c2c66affSColin Finck { 0x47, L"Home" },
458c2c66affSColin Finck { 0x48, L"Up" },
459c2c66affSColin Finck { 0x49, L"Page Up" },
460*299e4305STibor Lajos Füzi { 0x4b, L"Left" },
461c2c66affSColin Finck { 0x4c, L"Center" },
462c2c66affSColin Finck { 0x4d, L"Right" },
463c2c66affSColin Finck { 0x4f, L"End" },
464c2c66affSColin Finck { 0x50, L"Down" },
465c2c66affSColin Finck { 0x51, L"Page Down" },
466c2c66affSColin Finck { 0x52, L"Insert" },
467c2c66affSColin Finck { 0x53, L"Delete" },
468c2c66affSColin Finck { 0x54, L"<ReactOS>" },
469c2c66affSColin Finck { 0x55, L"Help" },
470c2c66affSColin Finck { 0x56, L"Left Windows" },
471c2c66affSColin Finck { 0x5b, L"Right Windows" },
472c2c66affSColin Finck { 0, NULL },
473c2c66affSColin Finck };
474c2c66affSColin Finck
475c2c66affSColin Finck /* Finally, the master table */
476c2c66affSColin Finck ROSDATA KBDTABLES keyboard_layout_table =
477c2c66affSColin Finck {
478c2c66affSColin Finck /* modifier assignments */
479c2c66affSColin Finck &modifier_bits,
480c2c66affSColin Finck
481c2c66affSColin Finck /* character from vk tables */
482c2c66affSColin Finck vk_to_wchar_master_table,
483c2c66affSColin Finck
484c2c66affSColin Finck /* diacritical marks -- currently implemented by wine code */
485c2c66affSColin Finck NULL,
486c2c66affSColin Finck
487c2c66affSColin Finck /* Key names */
488c2c66affSColin Finck (VSC_LPWSTR *)key_names,
489c2c66affSColin Finck (VSC_LPWSTR *)extended_key_names,
490c2c66affSColin Finck NULL, /* Dead key names */
491c2c66affSColin Finck
492c2c66affSColin Finck /* scan code to virtual key maps */
493c2c66affSColin Finck scancode_to_vk,
494cdf90707SStanislav Motylkov RTL_NUMBER_OF(scancode_to_vk),
495c2c66affSColin Finck extcode0_to_vk,
496c2c66affSColin Finck extcode1_to_vk,
497c2c66affSColin Finck
498c2c66affSColin Finck MAKELONG(0, 1), /* Version 1.0 */
499c2c66affSColin Finck
500c2c66affSColin Finck /* Ligatures -- The Standard Hebrew Keyboard doesn't have any */
501c2c66affSColin Finck 0,
502c2c66affSColin Finck 0,
503c2c66affSColin Finck NULL
504c2c66affSColin Finck };
505c2c66affSColin Finck
KbdLayerDescriptor(VOID)506c2c66affSColin Finck PKBDTABLES WINAPI KbdLayerDescriptor(VOID)
507c2c66affSColin Finck {
508c2c66affSColin Finck return &keyboard_layout_table;
509c2c66affSColin Finck }
510c2c66affSColin Finck
511