Main Page | Class Hierarchy | Class List | File List | Class Members | File Members

kbdibm02.c

Go to the documentation of this file.
00001 /***************************************************************************\ 00002 * Module Name: kbdibm02.c 00003 * 00004 * Copyright (c) 1985-92, Microsoft Corporation 00005 * 00006 * History: 00007 \***************************************************************************/ 00008 00009 #include <windows.h> 00010 #include <ime.h> 00011 #include "vkoem.h" 00012 #include "kbdjpn.h" 00013 #include "kbdibm02.h" 00014 00015 #if defined(_M_IA64) 00016 #pragma section(".data") 00017 #define ALLOC_SECTION_LDATA __declspec(allocate(".data")) 00018 #else 00019 #pragma data_seg(".data") 00020 #define ALLOC_SECTION_LDATA 00021 #endif 00022 00023 /***************************************************************************\ 00024 * ausVK[] - Virtual Scan Code to Virtual Key conversion table for IBM-J 5576-002 00025 \***************************************************************************/ 00026 00027 static ALLOC_SECTION_LDATA USHORT ausVK[] = { 00028 T00, T01, T02, T03, T04, T05, T06, T07, 00029 T08, T09, T0A, T0B, T0C, T0D, T0E, T0F, 00030 T10, T11, T12, T13, T14, T15, T16, T17, 00031 T18, T19, T1A, T1B, T1C, T1D, T1E, T1F, 00032 T20, T21, T22, T23, T24, T25, T26, T27, 00033 T28, T29, T2A, T2B, T2C, T2D, T2E, T2F, 00034 T30, T31, T32, T33, T34, T35, 00035 00036 /* 00037 * Right-hand Shift key must have KBDEXT bit set. 00038 */ 00039 T36 | KBDEXT, 00040 00041 T37 | KBDMULTIVK, // numpad_* + Shift/Alt -> SnapShot 00042 00043 T38, T39, 00044 00045 T3A | KBDSPECIAL, // Alphanumeric/Caps key // NLS key 00046 00047 T3B, T3C, T3D, T3E, T3F, T40, T41, T42, 00048 T43, T44, 00049 00050 /* 00051 * NumLock Key: 00052 * KBDEXT - VK_NUMLOCK is an Extended key 00053 * KBDMULTIVK - VK_NUMLOCK or VK_PAUSE (without or with CTRL) 00054 */ 00055 T45 | KBDEXT | KBDMULTIVK, 00056 00057 T46 | KBDMULTIVK, 00058 00059 /* 00060 * Number Pad keys: 00061 * KBDNUMPAD - digits 0-9 and decimal point. 00062 * KBDSPECIAL - require special processing by Windows 00063 */ 00064 T47 | KBDNUMPAD | KBDSPECIAL, // Numpad 7 (Home) 00065 T48 | KBDNUMPAD | KBDSPECIAL, // Numpad 8 (Up), 00066 T49 | KBDNUMPAD | KBDSPECIAL, // Numpad 9 (PgUp), 00067 T4A, 00068 T4B | KBDNUMPAD | KBDSPECIAL, // Numpad 4 (Left), 00069 T4C | KBDNUMPAD | KBDSPECIAL, // Numpad 5 (Clear), 00070 T4D | KBDNUMPAD | KBDSPECIAL, // Numpad 6 (Right), 00071 T4E, 00072 T4F | KBDNUMPAD | KBDSPECIAL, // Numpad 1 (End), 00073 T50 | KBDNUMPAD | KBDSPECIAL, // Numpad 2 (Down), 00074 T51 | KBDNUMPAD | KBDSPECIAL, // Numpad 3 (PgDn), 00075 T52 | KBDNUMPAD | KBDSPECIAL, // Numpad 0 (Ins), 00076 T53 | KBDNUMPAD | KBDSPECIAL, // Numpad . (Del), 00077 00078 T54, T55, T56, T57, T58, T59, T5A, T5B, 00079 T5C, T5D, T5E, T5F, T60, T61, T62, T63, 00080 T64, T65, T66, T67, T68, T69, T6A, T6B, 00081 T6C, T6D, T6E, T6F, 00082 00083 T70 | KBDSPECIAL, // Katakana/Kanji key 00084 00085 T71, T72, 00086 00087 T73, // | \ Katakana RO key // NLS key 00088 00089 T74, T75, T76, 00090 00091 T77 | KBDSPECIAL, // SBCS/DBCS key // NLS key 00092 00093 T78, 00094 00095 T79 | KBDSPECIAL, // Conversion key // NLS key 00096 00097 T7A, 00098 00099 T7B | KBDSPECIAL // Non-Conversion key // NLS key 00100 }; 00101 00102 static ALLOC_SECTION_LDATA VSC_VK aE0VscToVk[] = { 00103 { 0x1C, X1C | KBDEXT }, // Numpad Enter 00104 { 0x1D, X1D | KBDEXT }, // RControl 00105 { 0x33, X33 | KBDEXT }, // Comma key by 5576-002 special 00106 { 0x35, X35 | KBDEXT }, // Numpad Divide 00107 { 0x37, X37 | KBDEXT }, // Snapshot 00108 { 0x38, X38 | KBDEXT | KBDSPECIAL }, // Hiragana key // NLS key 00109 { 0x46, X46 | KBDEXT }, // Break (Ctrl + Pause) 00110 { 0x47, X47 | KBDEXT }, // Home 00111 { 0x48, X48 | KBDEXT }, // Up 00112 { 0x49, X49 | KBDEXT }, // Prior 00113 { 0x4B, X4B | KBDEXT }, // Left 00114 { 0x4D, X4D | KBDEXT }, // Right 00115 { 0x4F, X4F | KBDEXT }, // End 00116 { 0x50, X50 | KBDEXT }, // Down 00117 { 0x51, X51 | KBDEXT }, // Next 00118 { 0x52, X52 | KBDEXT }, // Insert 00119 { 0x53, X53 | KBDEXT }, // Delete 00120 { 0x5B, X5B | KBDEXT }, // Left Win 00121 { 0x5C, X5C | KBDEXT }, // Right Win 00122 { 0x5D, X5D | KBDEXT }, // Application 00123 { 0, 0 } 00124 }; 00125 00126 static ALLOC_SECTION_LDATA VSC_VK aE1VscToVk[] = { 00127 { 0x1D, Y1D }, // Pause 00128 { 0 , 0 } 00129 }; 00130 00131 /***************************************************************************\ 00132 * aVkToBits[] - map Virtual Keys to Modifier Bits 00133 * 00134 * See kbd.h for a full description. 00135 * 00136 * US Keyboard has only three shifter keys: 00137 * SHIFT (L & R) affects alphabnumeric keys, 00138 * CTRL (L & R) is used to generate control characters 00139 * ALT (L & R) used for generating characters by number with numpad 00140 \***************************************************************************/ 00141 00142 static ALLOC_SECTION_LDATA VK_TO_BIT aVkToBits[] = { 00143 { VK_SHIFT, KBDSHIFT }, 00144 { VK_CONTROL, KBDCTRL }, 00145 { VK_MENU, KBDALT }, 00146 { VK_KANA, KBDKANA }, 00147 { 0, 0 } 00148 }; 00149 00150 /***************************************************************************\ 00151 * aModification[] - map character modifier bits to modification number 00152 * 00153 * See kbd.h for a full description. 00154 * 00155 \***************************************************************************/ 00156 00157 static ALLOC_SECTION_LDATA MODIFIERS CharModifiers = { 00158 &aVkToBits[0], 00159 11, 00160 { 00161 // Modification# // Keys Pressed : Explanation 00162 // ============= // ============== : ============================= 00163 0, // : unshifted characters 00164 1, // SHIFT : capitals, ~!@#$%^&*()_+{}:"<>? etc. 00165 4, // CTRL : control characters 00166 6, // CTRL SHIFT : 00167 SHFT_INVALID, // ALT : invalid 00168 SHFT_INVALID, // ALT SHIFT : invalid 00169 SHFT_INVALID, // ALT CTRL : invalid 00170 SHFT_INVALID, // ALT CTRL SHIFT : invalid 00171 2, //KANA 00172 3, //KANA SHIFT 00173 5, //KANA CTRL 00174 7 //KANA CTRL SHIFT 00175 } 00176 }; 00177 00178 /***************************************************************************\ 00179 * 00180 * aVkToWch2[] - Virtual Key to WCHAR translation for 2 shift states 00181 * aVkToWch3[] - Virtual Key to WCHAR translation for 3 shift states 00182 * aVkToWch4[] - Virtual Key to WCHAR translation for 4 shift states 00183 * 00184 * Table attributes: Unordered Scan, null-terminated 00185 * 00186 * Search this table for an entry with a matching Virtual Key to find the 00187 * corresponding unshifted and shifted WCHAR characters. 00188 * 00189 * Reserved VirtualKey values (first column) 00190 * -1 - this line contains dead characters (diacritic) 00191 * 0 - terminator 00192 * 00193 * Reserved Attribute values (second column) 00194 * CAPLOK - CapsLock affects this key like Shift 00195 * KANALOK - The KANA-LOCK key affects this key like KANA 00196 * 00197 * Reserved character values (third through last column) 00198 * WCH_NONE - No character 00199 * WCH_DEAD - Dead character (diacritic) value is in next line 00200 * 00201 \***************************************************************************/ 00202 00203 static ALLOC_SECTION_LDATA VK_TO_WCHARS4 aVkToWch4[] = { 00204 // | | SHIFT | KANA | K+SHFT | 00205 // | |==========|========|========| 00206 {'0' , KANALOK ,'0' ,WCH_NONE ,WCH_WA ,WCH_WO }, 00207 {'1' , KANALOK ,'1' ,'!' ,WCH_NU ,WCH_NU }, 00208 {'3' , KANALOK ,'3' ,'#' ,WCH_A ,WCH_AA }, 00209 {'4' , KANALOK ,'4' ,'$' ,WCH_U ,WCH_UU }, 00210 {'5' , KANALOK ,'5' ,'%' ,WCH_E ,WCH_EE }, 00211 {'7' , KANALOK ,'7' ,0x27 ,WCH_YA ,WCH_YAA }, 00212 {'8' , KANALOK ,'8' ,'(' ,WCH_YU ,WCH_YUU }, 00213 {'9' , KANALOK ,'9' ,')' ,WCH_YO ,WCH_YOO }, 00214 {'A' , CAPLOK | KANALOK ,'a' ,'A' ,WCH_TI ,WCH_TI }, 00215 {'B' , CAPLOK | KANALOK ,'b' ,'B' ,WCH_KO ,WCH_KO }, 00216 {'C' , CAPLOK | KANALOK ,'c' ,'C' ,WCH_SO ,WCH_SO }, 00217 {'D' , CAPLOK | KANALOK ,'d' ,'D' ,WCH_SI ,WCH_SI }, 00218 {'E' , CAPLOK | KANALOK ,'e' ,'E' ,WCH_I ,WCH_II }, 00219 {'F' , CAPLOK | KANALOK ,'f' ,'F' ,WCH_HA ,WCH_HA }, 00220 {'G' , CAPLOK | KANALOK ,'g' ,'G' ,WCH_KI ,WCH_KI }, 00221 {'H' , CAPLOK | KANALOK ,'h' ,'H' ,WCH_KU ,WCH_KU }, 00222 {'I' , CAPLOK | KANALOK ,'i' ,'I' ,WCH_NI ,WCH_NI }, 00223 {'J' , CAPLOK | KANALOK ,'j' ,'J' ,WCH_MA ,WCH_MA }, 00224 {'K' , CAPLOK | KANALOK ,'k' ,'K' ,WCH_NO ,WCH_NO }, 00225 {'L' , CAPLOK | KANALOK ,'l' ,'L' ,WCH_RI ,WCH_RI }, 00226 {'M' , CAPLOK | KANALOK ,'m' ,'M' ,WCH_MO ,WCH_MO }, 00227 {'N' , CAPLOK | KANALOK ,'n' ,'N' ,WCH_MI ,WCH_MI }, 00228 {'O' , CAPLOK | KANALOK ,'o' ,'O' ,WCH_RA ,WCH_RA }, 00229 {'P' , CAPLOK | KANALOK ,'p' ,'P' ,WCH_SE ,WCH_SE }, 00230 {'Q' , CAPLOK | KANALOK ,'q' ,'Q' ,WCH_TA ,WCH_TA }, 00231 {'R' , CAPLOK | KANALOK ,'r' ,'R' ,WCH_SU ,WCH_SU }, 00232 {'S' , CAPLOK | KANALOK ,'s' ,'S' ,WCH_TO ,WCH_TO }, 00233 {'T' , CAPLOK | KANALOK ,'t' ,'T' ,WCH_KA ,WCH_KA }, 00234 {'U' , CAPLOK | KANALOK ,'u' ,'U' ,WCH_NA ,WCH_NA }, 00235 {'V' , CAPLOK | KANALOK ,'v' ,'V' ,WCH_HI ,WCH_HI }, 00236 {'W' , CAPLOK | KANALOK ,'w' ,'W' ,WCH_TE ,WCH_TE }, 00237 {'X' , CAPLOK | KANALOK ,'x' ,'X' ,WCH_SA ,WCH_SA }, 00238 {'Y' , CAPLOK | KANALOK ,'y' ,'Y' ,WCH_NN ,WCH_NN }, 00239 {'Z' , CAPLOK | KANALOK ,'z' ,'Z' ,WCH_TU ,WCH_TUU }, 00240 {VK_OEM_1 , KANALOK ,':' ,'*' ,WCH_KE ,WCH_KE }, 00241 {VK_OEM_2 , KANALOK ,'/' ,'?' ,WCH_ME ,WCH_MD }, 00242 {VK_OEM_3 , KANALOK ,'@' ,'`' ,WCH_VS ,WCH_VS }, 00243 {VK_OEM_7 , KANALOK ,'^' ,'~' ,WCH_HE ,WCH_HE }, 00244 {VK_OEM_8 , 0 ,',' ,',' ,',' ,',' }, 00245 {VK_OEM_COMMA , KANALOK ,',' ,'<' ,WCH_NE ,WCH_IC }, 00246 {VK_OEM_PERIOD, KANALOK ,'.' ,'>' ,WCH_RU ,WCH_IP }, 00247 {VK_OEM_PLUS , KANALOK ,';' ,'+' ,WCH_RE ,WCH_RE }, 00248 {VK_TAB , 0 ,'\t' ,'\t' ,'\t' ,'\t' }, 00249 {VK_ADD , 0 ,'+' ,'+' ,'+' ,'+' }, 00250 {VK_DECIMAL , 0 ,'.' ,'.' ,'.' ,'.' }, 00251 {VK_DIVIDE , 0 ,'/' ,'/' ,'/' ,'/' }, 00252 {VK_MULTIPLY , 0 ,'*' ,'*' ,'*' ,'*' }, 00253 {VK_SUBTRACT , 0 ,'-' ,'-' ,'-' ,'-' }, 00254 {0 , 0 ,0 ,0 ,0 ,0 } 00255 }; 00256 00257 static ALLOC_SECTION_LDATA VK_TO_WCHARS6 aVkToWch6[] = { 00258 // | | SHIFT | KANA | K+SHFT | CONTROL | K+CTRL | 00259 // | |==========|========|========|===========|===========| 00260 {VK_BACK , 0 ,'\b' ,'\b' ,'\b' ,'\b' , 0x7f , 0x7f }, 00261 {VK_CANCEL , 0 ,0x03 ,0x03 ,0x03 ,0x03 , 0x03 , 0x03 }, 00262 {VK_ESCAPE , 0 ,0x1b ,0x1b ,0x1b ,0x1b , 0x1b , 0x1b }, 00263 {VK_OEM_4 , KANALOK ,'[' ,'{' ,WCH_SVS ,WCH_OB , 0x1b , 0x1b }, 00264 {VK_OEM_5 , KANALOK ,'\\' ,'|' ,WCH_PS ,WCH_PS , 0x1c , 0x1c }, 00265 {VK_OEM_102 , KANALOK ,'\\' ,'_' ,WCH_RO ,WCH_RO , 0x1c , 0x1c }, 00266 {VK_OEM_6 , KANALOK ,']' ,'}' ,WCH_MU ,WCH_CB , 0x1d , 0x1d }, 00267 {VK_RETURN , 0 ,'\r' ,'\r' ,'\r' ,'\r' , '\n' , '\n' }, 00268 {VK_SPACE , 0 ,' ' ,' ' ,' ' ,' ' , 0x20 , 0x20 }, 00269 {0 , 0 ,0 ,0 ,0 ,0 , 0 , 0 } 00270 }; 00271 00272 static ALLOC_SECTION_LDATA VK_TO_WCHARS8 aVkToWch8[] = { 00273 // | | SHIFT | KANA | K+SHFT | CONTROL | K+CTRL | SHFT+CTRL |K+SHFT+CTRL| 00274 // | |==========|========|========|===========|===========|===========|===========| 00275 {'2' , KANALOK ,'2' ,'"' ,WCH_HU ,WCH_HU , WCH_NONE , WCH_NONE , 0x00 , 0x00 }, 00276 {'6' , KANALOK ,'6' ,'&' ,WCH_O ,WCH_OO , WCH_NONE , WCH_NONE , 0x1e , 0x1e }, 00277 {VK_OEM_MINUS , KANALOK ,'-' ,'=' ,WCH_HO ,WCH_HO , WCH_NONE , WCH_NONE , 0x1f , 0x1f }, 00278 {0 , 0 ,0 ,0 ,0 ,0 , 0 , 0 , 0 , 0 } 00279 }; 00280 00281 // Put this last so that VkKeyScan interprets number characters 00282 // as coming from the main section of the kbd (aVkToWch2 and 00283 // aVkToWch4) before considering the numpad (aVkToWch1). 00284 00285 static ALLOC_SECTION_LDATA VK_TO_WCHARS4 aVkToWch1[] = { 00286 // | | SHIFT | KANA | K+SHFT | 00287 // | |==========|========|========| 00288 { VK_NUMPAD0 , 0 , '0' , WCH_NONE , '0' ,WCH_NONE}, 00289 { VK_NUMPAD1 , 0 , '1' , WCH_NONE , '1' ,WCH_NONE}, 00290 { VK_NUMPAD2 , 0 , '2' , WCH_NONE , '2' ,WCH_NONE}, 00291 { VK_NUMPAD3 , 0 , '3' , WCH_NONE , '3' ,WCH_NONE}, 00292 { VK_NUMPAD4 , 0 , '4' , WCH_NONE , '4' ,WCH_NONE}, 00293 { VK_NUMPAD5 , 0 , '5' , WCH_NONE , '5' ,WCH_NONE}, 00294 { VK_NUMPAD6 , 0 , '6' , WCH_NONE , '6' ,WCH_NONE}, 00295 { VK_NUMPAD7 , 0 , '7' , WCH_NONE , '7' ,WCH_NONE}, 00296 { VK_NUMPAD8 , 0 , '8' , WCH_NONE , '8' ,WCH_NONE}, 00297 { VK_NUMPAD9 , 0 , '9' , WCH_NONE , '9' ,WCH_NONE}, 00298 { 0 , 0 , '\0' , 0 , 0 ,0 } //null terminator 00299 }; 00300 00301 /***************************************************************************\ 00302 * aVkToWcharTable: table of pointers to Character Tables 00303 * 00304 * Describes the character tables and the order they should be searched. 00305 * 00306 * Note: the order determines the behavior of VkKeyScan() : this function 00307 * takes a character and attempts to find a Virtual Key and character- 00308 * modifier key combination that produces that character. The table 00309 * containing the numeric keypad (aVkToWch1) must appear last so that 00310 * VkKeyScan('0') will be interpreted as one of keys from the main 00311 * section, not the numpad. etc. 00312 \***************************************************************************/ 00313 00314 static ALLOC_SECTION_LDATA VK_TO_WCHAR_TABLE aVkToWcharTable[] = { 00315 { (PVK_TO_WCHARS1)aVkToWch6, 6, sizeof(aVkToWch6[0]) }, 00316 { (PVK_TO_WCHARS1)aVkToWch8, 8, sizeof(aVkToWch8[0]) }, 00317 { (PVK_TO_WCHARS1)aVkToWch4, 4, sizeof(aVkToWch4[0]) }, 00318 { (PVK_TO_WCHARS1)aVkToWch1, 4, sizeof(aVkToWch1[0]) }, // must come last 00319 { NULL, 0, 0 } 00320 }; 00321 00322 /***************************************************************************\ 00323 * aKeyNames[], aKeyNamesExt[] - Scan Code -> Key Name tables 00324 * 00325 * For the GetKeyNameText() API function 00326 * 00327 * Tables for non-extended and extended (KBDEXT) keys. 00328 * (Keys producing printable characters are named by the character itself) 00329 \***************************************************************************/ 00330 00331 static ALLOC_SECTION_LDATA VSC_LPWSTR aKeyNames[] = { 00332 0x01, L"Esc", 00333 0x0e, L"Backspace", 00334 0x0f, L"Tab", 00335 0x1c, L"Enter", 00336 0x1d, L"Ctrl", 00337 0x2a, L"Shift", 00338 0x36, L"Right Shift", 00339 0x37, L"Num *", 00340 0x38, L"Alt", 00341 0x39, L"Space", 00342 0x3a, L"Caps Lock", 00343 0x3b, L"F1", 00344 0x3c, L"F2", 00345 0x3d, L"F3", 00346 0x3e, L"F4", 00347 0x3f, L"F5", 00348 0x40, L"F6", 00349 0x41, L"F7", 00350 0x42, L"F8", 00351 0x43, L"F9", 00352 0x44, L"F10", 00353 0x45, L"Pause", 00354 0x46, L"Scroll Lock", 00355 0x47, L"Num 7", 00356 0x48, L"Num 8", 00357 0x49, L"Num 9", 00358 0x4a, L"Num -", 00359 0x4b, L"Num 4", 00360 0x4c, L"Num 5", 00361 0x4d, L"Num 6", 00362 0x4e, L"Num +", 00363 0x4f, L"Num 1", 00364 0x50, L"Num 2", 00365 0x51, L"Num 3", 00366 0x52, L"Num 0", 00367 0x53, L"Num Del", 00368 0x54, L"Sys Req", 00369 0x57, L"F11", 00370 0x58, L"F12", 00371 0x70, (LPWSTR)SZ_KEY_NAME_KATAKANA, // NLS Key 00372 0x77, (LPWSTR)SZ_KEY_NAME_HANKAKU_ZENKAKU, // NLS Key 00373 0x79, (LPWSTR)SZ_KEY_NAME_HENKAN, // NLS Key 00374 0x7b, (LPWSTR)SZ_KEY_NAME_MUHENKAN, // NLS Key 00375 0 , NULL 00376 }; 00377 00378 static ALLOC_SECTION_LDATA VSC_LPWSTR aKeyNamesExt[] = { 00379 0x1c, L"Num Enter", 00380 0x1d, L"Right Control", 00381 0x35, L"Num /", 00382 0x37, L"Prnt Scrn", 00383 0x38, (LPWSTR)SZ_KEY_NAME_HIRAGANA, // NLS Key 00384 0x45, L"Num Lock", 00385 0x46, L"Break", 00386 0x47, L"Home", 00387 0x48, L"Up", 00388 0x49, L"Page Up", 00389 0x4b, L"Left", 00390 0x4d, L"Right", 00391 0x4f, L"End", 00392 0x50, L"Down", 00393 0x51, L"Page Down", 00394 0x52, L"Insert", 00395 0x53, L"Delete", 00396 0x54, L"<00>", 00397 0x56, L"Help", 00398 0x5B, L"Left Windows", 00399 0x5C, L"Right Windows", 00400 0x5D, L"Application", 00401 0 , NULL 00402 }; 00403 00404 static ALLOC_SECTION_LDATA KBDTABLES KbdTables = { 00405 /* 00406 * Modifier keys 00407 */ 00408 &CharModifiers, 00409 00410 /* 00411 * Characters tables 00412 */ 00413 aVkToWcharTable, 00414 00415 /* 00416 * Diacritics (none for US English) 00417 */ 00418 NULL, 00419 00420 /* 00421 * Names of Keys (no dead keys) 00422 */ 00423 aKeyNames, 00424 aKeyNamesExt, 00425 NULL, 00426 00427 /* 00428 * Scan codes to Virtual Keys 00429 */ 00430 ausVK, 00431 sizeof(ausVK) / sizeof(ausVK[0]), 00432 aE0VscToVk, 00433 aE1VscToVk, 00434 00435 /* 00436 * No Locale-specific special processing 00437 */ 00438 0 00439 }; 00440 00441 PKBDTABLES KbdLayerDescriptor(VOID) 00442 { 00443 return &KbdTables; 00444 } 00445 00446 /***********************************************************************\ 00447 * VkToFuncTable_101[] 00448 * 00449 \***********************************************************************/ 00450 00451 static ALLOC_SECTION_LDATA VK_F VkToFuncTable_IBM002[] = { 00452 { 00453 VK_DBE_KATAKANA, // Base Vk 00454 KBDNLS_TYPE_TOGGLE, // NLSFEProcType 00455 KBDNLS_INDEX_NORMAL, // NLSFEProcCurrent 00456 0x04, /* 00000100 */ // NLSFEProcSwitch 00457 { // NLSFEProc 00458 {KBDNLS_KATAKANA,0}, // Base 00459 {KBDNLS_SEND_PARAM_VK,VK_KANJI}, // Shift 00460 {KBDNLS_SEND_PARAM_VK,VK_KANA}, // Control 00461 {KBDNLS_NOEVENT,0}, // Shift+Control 00462 {KBDNLS_CODEINPUT,0}, // Alt 00463 {KBDNLS_CODEINPUT,0}, // Shift+Alt 00464 {KBDNLS_CODEINPUT,0}, // Control+Alt 00465 {KBDNLS_CODEINPUT,0} // Shift+Control+Alt 00466 }, 00467 { // NLSFEProcAlt 00468 {KBDNLS_SEND_PARAM_VK,VK_KANA}, // Base 00469 {KBDNLS_NOEVENT,0}, // Shift 00470 {KBDNLS_SEND_PARAM_VK,VK_KANA}, // Control 00471 {KBDNLS_NOEVENT,0}, // Shift+Control 00472 {KBDNLS_NOEVENT,0}, // Alt 00473 {KBDNLS_NOEVENT,0}, // Shift+Alt 00474 {KBDNLS_NOEVENT,0}, // Control+Alt 00475 {KBDNLS_NOEVENT,0} // Shift+Control+Alt 00476 } 00477 }, 00478 { 00479 VK_DBE_ALPHANUMERIC, // Base Vk 00480 KBDNLS_TYPE_TOGGLE, // NLSFEProcType 00481 KBDNLS_INDEX_NORMAL, // NLSFEProcCurrent 00482 0xFE, /* 11111110 */ // NLSFEProcSwitch 00483 { // NLSFEProc 00484 {KBDNLS_ALPHANUM,0}, // Base 00485 {KBDNLS_SEND_PARAM_VK,VK_CAPITAL}, // Shift 00486 {KBDNLS_SEND_PARAM_VK,VK_CAPITAL}, // Control 00487 {KBDNLS_SEND_PARAM_VK,VK_CAPITAL}, // Shift+Control 00488 {KBDNLS_SEND_PARAM_VK,VK_CAPITAL}, // Alt 00489 {KBDNLS_SEND_PARAM_VK,VK_CAPITAL}, // Shift+Alt 00490 {KBDNLS_SEND_PARAM_VK,VK_CAPITAL}, // Control+Alt 00491 {KBDNLS_SEND_PARAM_VK,VK_CAPITAL} // Shift+Control+Alt 00492 }, 00493 { // NLSFEProcIndexAlt 00494 {KBDNLS_SEND_PARAM_VK,VK_CAPITAL}, // Base 00495 {KBDNLS_SEND_PARAM_VK,VK_CAPITAL}, // Shift 00496 {KBDNLS_SEND_PARAM_VK,VK_CAPITAL}, // Control 00497 {KBDNLS_SEND_PARAM_VK,VK_CAPITAL}, // Shift+Control 00498 {KBDNLS_SEND_PARAM_VK,VK_CAPITAL}, // Alt 00499 {KBDNLS_SEND_PARAM_VK,VK_CAPITAL}, // Shift+Alt 00500 {KBDNLS_SEND_PARAM_VK,VK_CAPITAL}, // Control+Alt 00501 {KBDNLS_SEND_PARAM_VK,VK_CAPITAL} // Shift+Control+Alt 00502 } 00503 }, 00504 { 00505 VK_DBE_HIRAGANA, // Base Vk 00506 KBDNLS_TYPE_NORMAL, // NLSFEProcType 00507 KBDNLS_INDEX_NORMAL, // NLSFEProcCurrent 00508 0, // NLSFEProcSwitch 00509 { // NLSFEProc 00510 {KBDNLS_HIRAGANA,0}, // Base 00511 {KBDNLS_HIRAGANA,0}, // Shift 00512 {KBDNLS_HIRAGANA,0}, // Control 00513 {KBDNLS_HIRAGANA,0}, // Shift+Control 00514 {KBDNLS_ROMAN,0}, // Alt 00515 {KBDNLS_ROMAN,0}, // Shift+Alt 00516 {KBDNLS_ROMAN,0}, // Control+Alt 00517 {KBDNLS_ROMAN,0} // Shift+Control+Alt 00518 }, 00519 { // NLSFEProcIndexAlt 00520 {KBDNLS_NULL,0}, // Base 00521 {KBDNLS_NULL,0}, // Shift 00522 {KBDNLS_NULL,0}, // Control 00523 {KBDNLS_NULL,0}, // Shift+Control 00524 {KBDNLS_NULL,0}, // Alt 00525 {KBDNLS_NULL,0}, // Shift+Alt 00526 {KBDNLS_NULL,0}, // Control+Alt 00527 {KBDNLS_NULL,0} // Shift+Control+Alt 00528 } 00529 }, 00530 { 00531 VK_DBE_SBCSCHAR, // Base Vk 00532 KBDNLS_TYPE_NORMAL, // NLSFEProcType 00533 KBDNLS_INDEX_NORMAL, // NLSFEProcCurrent 00534 0, // NLSFEProcSwitch 00535 { // NLSFEProc 00536 {KBDNLS_SBCSDBCS,0}, // Base 00537 {KBDNLS_SBCSDBCS,0}, // Shift 00538 {KBDNLS_SBCSDBCS,0}, // Control 00539 {KBDNLS_SBCSDBCS,0}, // Shift+Control 00540 {KBDNLS_NOEVENT,0}, // Alt 00541 {KBDNLS_NOEVENT,0}, // Shift+Alt 00542 {KBDNLS_SEND_PARAM_VK,VK_DBE_ENTERIMECONFIGMODE}, // Control+Alt 00543 {KBDNLS_SEND_PARAM_VK,VK_DBE_ENTERIMECONFIGMODE} // Shift+Control+Alt 00544 }, 00545 { // NLSFEProcIndexAlt 00546 {KBDNLS_NULL,0}, // Base 00547 {KBDNLS_NULL,0}, // Shift 00548 {KBDNLS_NULL,0}, // Control 00549 {KBDNLS_NULL,0}, // Shift+Control 00550 {KBDNLS_NULL,0}, // Alt 00551 {KBDNLS_NULL,0}, // Shift+Alt 00552 {KBDNLS_NULL,0}, // Control+Alt 00553 {KBDNLS_NULL,0} // Shift+Control+Alt 00554 } 00555 }, 00556 { 00557 VK_NONCONVERT, // Base Vk 00558 KBDNLS_TYPE_NORMAL, // NLSFEProcType 00559 KBDNLS_INDEX_NORMAL, // NLSFEProcCurrent 00560 0, // NLSFEProcSwitch 00561 { // NLSFEProc 00562 {KBDNLS_SEND_BASE_VK,0}, // Base 00563 {KBDNLS_NOEVENT,0}, // Shift 00564 {KBDNLS_NOEVENT,0}, // Control 00565 {KBDNLS_NOEVENT,0}, // Shift+Control 00566 {KBDNLS_NOEVENT,0}, // Alt 00567 {KBDNLS_NOEVENT,0}, // Shift+Alt 00568 {KBDNLS_SEND_PARAM_VK,VK_DBE_ENTERWORDREGISTERMODE}, // Control+Alt 00569 {KBDNLS_SEND_PARAM_VK,VK_DBE_ENTERWORDREGISTERMODE} // Shift+Control+Alt 00570 }, 00571 { // NLSFEProcIndexAlt 00572 {KBDNLS_NULL,0}, // Base 00573 {KBDNLS_NULL,0}, // Shift 00574 {KBDNLS_NULL,0}, // Control 00575 {KBDNLS_NULL,0}, // Shift+Control 00576 {KBDNLS_NULL,0}, // Alt 00577 {KBDNLS_NULL,0}, // Shift+Alt 00578 {KBDNLS_NULL,0}, // Control+Alt 00579 {KBDNLS_NULL,0} // Shift+Control+Alt 00580 } 00581 } 00582 }; 00583 00584 /***********************************************************************\ 00585 * KbdNlsTables 00586 * 00587 \***********************************************************************/ 00588 00589 static ALLOC_SECTION_LDATA KBDNLSTABLES KbdNlsTables = { 00590 0, // OEM ID (0 = Microsoft) 00591 0, // Information 00592 5, // Number of VK_F entry 00593 VkToFuncTable_IBM002, // Pointer to VK_F array 00594 0, // Pointer to MouseVk entry 00595 NULL // Pointer to MouseVk array 00596 }; 00597 00598 PKBDNLSTABLES KbdNlsLayerDescriptor(VOID) 00599 { 00600 return &KbdNlsTables; 00601 }

Generated on Sat May 15 19:40:32 2004 for test by doxygen 1.3.7