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