Changeset 2205
- Timestamp:
- 03/21/10 03:03:18 (3 years ago)
- Files:
-
- 1 modified
-
windows/kbdneo2/Quelldateien/kbdneo2.c (modified) (26 diffs)
Legend:
- Unmodified
- Added
- Removed
-
windows/kbdneo2/Quelldateien/kbdneo2.c
r2202 r2205 1 /* **************************************************************************\1 /* **************************************************************************\ 2 2 * Module Name: KBDNEO2.C 3 3 * Deutsches ergonomische Layout Neo 2.0 4 \************************************************************************** */4 \************************************************************************** */ 5 5 6 6 #include <windows.h> … … 16 16 #endif 17 17 18 /***************************************************************************\ 19 * ausVK[] - Virtual Scan Code to Virtual Key conversion table for German 20 \***************************************************************************/ 18 19 /* **************************************************************************\ 20 * ausVK[] - Virtual Scan Code to Virtual Key 21 \************************************************************************** */ 21 22 22 23 static ALLOC_SECTION_LDATA USHORT ausVK[] = { … … 29 30 T30, T31, T32, T33, T34, T35, 30 31 31 /* 32 * Right-hand Shift key must have KBDEXT bit set. 33 */ 32 33 // Rechtes Shift muss KBDEXT bit haben 34 34 35 T36 | KBDEXT, 35 36 … … 39 40 T3F, T40, T41, T42, T43, T44, 40 41 41 /* 42 * NumLock Key:43 * KBDEXT - VK_NUMLOCK is anExtended key44 * KBDMULTIVK - VK_NUMLOCK o r VK_PAUSE (without or with CTRL)45 */ 46 T45 | KBDEXT | KBDMULTIVK,42 43 /* NumLock Key: 44 * KBDEXT - VK_NUMLOCK ist Extended key 45 * KBDMULTIVK - VK_NUMLOCK oder VK_PAUSE (mit oder ohne STRG) */ 46 47 T45 | KBDEXT | KBDMULTIVK, 47 48 48 49 T46 | KBDMULTIVK, 49 50 51 50 52 /* 51 53 * Number Pad keys: … … 53 55 * KBDSPECIAL - require special processing by Windows 54 56 */ 55 T47 | KBDNUMPAD | KBDSPECIAL, // Numpad 7 (Home) 57 58 T47 | KBDNUMPAD | KBDSPECIAL, // Numpad 7 (Home) 56 59 T48 | KBDNUMPAD | KBDSPECIAL, // Numpad 8 (Up), 57 60 T49 | KBDNUMPAD | KBDSPECIAL, // Numpad 9 (PgUp), … … 75 78 76 79 }; 80 77 81 78 82 static ALLOC_SECTION_LDATA VSC_VK aE0VscToVk[] = { … … 118 122 }; 119 123 124 120 125 static ALLOC_SECTION_LDATA VSC_VK aE1VscToVk[] = { 121 126 { 0x1D, Y1D }, // Pause … … 123 128 }; 124 129 125 /***************************************************************************\ 130 131 /* **************************************************************************\ 126 132 * aVkToBits[] - map Virtual Keys to Modifier Bits 127 133 * 128 * See kbd.h for a full description. 129 \***************************************************************************/ 134 * Siehe kbd.h f�r mehr Infos 135 \************************************************************************** */ 136 130 137 // Es wird nicht zwischen linken und/oder rechtem Modifier unterschieden 138 131 139 static ALLOC_SECTION_LDATA VK_TO_BIT aVkToBits[] = { 132 140 { VK_SHIFT , KBDSHIFT }, … … 138 146 }; 139 147 140 /***************************************************************************\ 148 149 /* **************************************************************************\ 141 150 * aModification[] - map character modifier bits to modification number 142 151 * 143 * See kbd.h for a full description. 144 * 145 \***************************************************************************/ 152 * Siehe kbd.h f�r mehr Infos 153 \************************************************************************** */ 146 154 147 155 static ALLOC_SECTION_LDATA MODIFIERS CharModifiers = { … … 188 196 }; 189 197 190 /***************************************************************************\ 198 199 /* **************************************************************************\ 200 * Spezielle Werte f�r den VK (Spalte 1) 201 * 0xff - Tote Zeichen f�r obige Zeile 202 * 0 - Beendet die gesamte Liste 191 203 * 192 * aVkToWch2[] - Virtual Key to WCHAR translation for 2 shift states 193 * aVkToWch3[] - Virtual Key to WCHAR translation for 3 shift states 194 * aVkToWch4[] - Virtual Key to WCHAR translation for 4 shift states 195 * aVkToWch5[] - Virtual Key to WCHAR translation for 5 shift states 196 * aVkToWch6[] - Virtual Key to WCHAR translation for 6 shift states 197 * aVkToWch7[] - Virtual Key to WCHAR translation for 7 shift states 198 * aVkToWch8[] - Virtual Key to WCHAR translation for 8 shift states 199 * aVkToWch9[] - Virtual Key to WCHAR translation for 9 shift states 204 * Spezielle Werte f�r Attributes (Spalte 2) 205 * CAPLOK - CAPS-LOCK wirkt auf diese Taste wie SHIFT 206 * KANALOK - Mod4-LOCK wirkt auf diese Taste wie Mod4 200 207 * 201 * Table attributes: Unordered Scan, null-terminated 202 * 203 * Search this table for an entry with a matching Virtual Key to find the 204 * corresponding unshifted and shifted WCHAR characters. 205 * 206 * Special values for VirtualKey (column 1) 207 * 0xff - dead chars for the previous entry 208 * 0 - terminate the list 209 * 210 * Special values for Attributes (column 2) 211 * CAPLOK bit - CAPS-LOCK affect this key like SHIFT 212 * 213 * Special values for wch[*] (column 3 & 4) 214 * WCH_NONE - No character 215 * WCH_DEAD - Dead Key (diaresis) or invalid (US keyboard has none) 216 * WCH_LGTR - Ligature (generates multiple characters) 217 * 218 \***************************************************************************/ 208 * Spezielle Werte f�r wch[*] 209 * WCH_NONE - Keine Belegung 210 * WCH_DEAD - Totes Zeichen 211 * WCH_LGTR - Ligatur 212 \************************************************************************** */ 219 213 220 214 static ALLOC_SECTION_LDATA VK_TO_WCHARS6 aVkToWch6[] = { … … 294 288 }; 295 289 296 // Put this last so that VkKeyScan interprets number characters 297 // as coming from the main section of the kbd before considering 298 // the numpad. 299 290 // Numpad-Belegung muss zum Schluss kommen 300 291 // Entgegen der neo20.txt vorgesehene Belegung 1,2,3,4,5,6 ist hier 1,4,3,2 umgesetzt: 301 302 303 292 static ALLOC_SECTION_LDATA VK_TO_WCHARS4 aVkToWch4[] = { 304 293 // | CapsLock | | SHIFT | KANA | NEU | … … 322 311 }; 323 312 313 324 314 // Hier m�ssen die verwendeten WChar_Tables vorkommen; Numpad MUSS letzte Zeile sein. 325 315 static ALLOC_SECTION_LDATA VK_TO_WCHAR_TABLE aVkToWcharTable[] = { … … 331 321 }; 332 322 333 /***************************************************************************\ 323 324 /* **************************************************************************\ 334 325 * aKeyNames[], aKeyNamesExt[] - Virtual Scancode to Key Name tables 335 326 * 336 327 * Table attributes: Ordered Scan (by scancode), null-terminated 337 328 * 338 * Only the names of Extended, NumPad, Dead and Non-Printable keys are here.339 * (Keys producing printable characters are named by that character)340 \************************************************************************** */329 * Nur f�r Tasten, die keine Zeichen erzeugen, Tasten die Zeichen erzeugen 330 * werden danach benannt 331 \************************************************************************** */ 341 332 342 333 static ALLOC_SECTION_LDATA VSC_LPWSTR aKeyNames[] = { … … 384 375 }; 385 376 377 386 378 static ALLOC_SECTION_LDATA VSC_LPWSTR aKeyNamesExt[] = { 387 379 0x1c, L"EINGABE (ZEHNERTASTATUR)", … … 410 402 }; 411 403 404 412 405 static ALLOC_SECTION_LDATA DEADKEY_LPWSTR aKeyNamesDead[] = { 413 406 //Tottaste 1 (links neben 1) … … 426 419 L"\x1ffe" L"SPIRITUS_ASPER", 427 420 L"\x00AF" L"MAKRON", 428 421 429 422 //Tottaste 3 (rechts neben �ߓ) 430 423 L"\x00B4" L"AKUT", … … 433 426 L"\x02DD" L"DOPPEL_AKUT", 434 427 L"\x1fbf" L"SPIRITUS_LENIS", 435 L"\x02D8" L"BREVE", 436 428 L"\x02D8" L"BREVE", 437 429 NULL 438 430 }; 431 439 432 440 433 static ALLOC_SECTION_LDATA DEADKEY aDeadKey[] = { … … 444 437 // 445 438 // Bei Doppelbelegungen wird erster Treffer genommen 446 // 447 439 // 440 // 448 441 //Deadkeys 449 442 // Nachfolgend Tafeln f�r die diakritschen Zeichen … … 483 476 DEADTRANS( L'Z' , L'^' , 0x1e90 , 0x0000), 484 477 DEADTRANS( L'z' , L'^' , 0x1e91 , 0x0000), 485 DEADTRANS( L'?' , L'^' , 0x02c0 , 0x0000), // ab hier lang.module478 DEADTRANS( L'?' , L'^' , 0x02c0 , 0x0000), // ab hier lang.module 486 479 DEADTRANS( 0x00d7 , L'^' , 0x02c0 , 0x0000), 487 DEADTRANS( 0x03b1 , L'^' , 0x1d45 , 0x0000), //Greek_alpha488 DEADTRANS( 0x03b5 , L'^' , 0x1d4b , 0x0000), //Greek_epsilon489 DEADTRANS( 0x03c5 , L'^' , 0x1db7 , 0x0000), //Greek_upsilon490 DEADTRANS( 0x03d5 , L'^' , 0x1db2 , 0x0000), // Ende lang.module491 DEADTRANS( L'1' , L'^' , 0x00b9 , 0x0000), //ab hier hochgestelltes480 DEADTRANS( 0x03b1 , L'^' , 0x1d45 , 0x0000), //Greek_alpha 481 DEADTRANS( 0x03b5 , L'^' , 0x1d4b , 0x0000), //Greek_epsilon 482 DEADTRANS( 0x03c5 , L'^' , 0x1db7 , 0x0000), //Greek_upsilon 483 DEADTRANS( 0x03d5 , L'^' , 0x1db2 , 0x0000), // Ende lang.module 484 DEADTRANS( L'1' , L'^' , 0x00b9 , 0x0000), //ab hier hochgestelltes 492 485 DEADTRANS( L'2' , L'^' , 0x00b2 , 0x0000), 493 486 DEADTRANS( L'3' , L'^' , 0x00b3 , 0x0000), … … 507 500 508 501 //Caron (ferfig f�r en_US.UTF-8 und lang.module) 509 DEADTRANS( L' ' , 0x02c7 , 0x02c7 , 0x0000), //Caron510 DEADTRANS( 0x02c7 , 0x02c7 , 0x030C , 0x0000), //2x f�r Combining502 DEADTRANS( L' ' , 0x02c7 , 0x02c7 , 0x0000), //Caron 503 DEADTRANS( 0x02c7 , 0x02c7 , 0x030C , 0x0000), //2x f�r Combining 511 504 DEADTRANS( L'A' , 0x02c7 , 0x01CD , 0x0000), 512 505 DEADTRANS( L'a' , 0x02c7 , 0x01CE , 0x0000), … … 588 581 589 582 //Punkt Dr�ber & Mittenpunkt (ferfig f�r en_US.UTF-8 und lang.module) 590 DEADTRANS( L' ' , 0x02d9 , 0x02d9 , 0x0000), //Punkt Dr�ber591 DEADTRANS( 0x02d9 , 0x02d9 , 0x0307 , 0x0000), //2x f�r Combining592 DEADTRANS( L'L' , 0x02d9 , 0x013F , 0x0000), //Mittenpunkt593 DEADTRANS( L'l' , 0x02d9 , 0x0140 , 0x0000), //Mittenpunkt594 DEADTRANS( 0x017f , 0x02d9 , 0x1E9B , 0x0000), // Lang-s mit Punkt dr�ber583 DEADTRANS( L' ' , 0x02d9 , 0x02d9 , 0x0000), //Punkt Dr�ber 584 DEADTRANS( 0x02d9 , 0x02d9 , 0x0307 , 0x0000), //2x f�r Combining 585 DEADTRANS( L'L' , 0x02d9 , 0x013F , 0x0000), //Mittenpunkt 586 DEADTRANS( L'l' , 0x02d9 , 0x0140 , 0x0000), //Mittenpunkt 587 DEADTRANS( 0x017f , 0x02d9 , 0x1E9B , 0x0000), // Lang-s mit Punkt dr�ber 595 588 DEADTRANS( L'A' , 0x02d9 , 0x0226 , 0x0000), 596 589 DEADTRANS( L'a' , 0x02d9 , 0x0227 , 0x0000), … … 680 673 681 674 //Punkt Darunter (ferfig f�r en_US.UTF-8 und lang.module) 682 DEADTRANS( L' ' , L'.' , L'.' , 0x0000), //Puntkdarunter683 DEADTRANS( L'.' , L'.' , 0x0323 , 0x0000), //2x f�r Combining675 DEADTRANS( L' ' , L'.' , L'.' , 0x0000), //Punkt darunter 676 DEADTRANS( L'.' , L'.' , 0x0323 , 0x0000), //2x f�r Combining 684 677 DEADTRANS( L'A' , L'.' , 0x1ea0 , 0x0000), 685 678 DEADTRANS( L'a' , L'.' , 0x1ea1 , 0x0000), … … 3430 3423 DEADTRANS( 0x0338 , 0x22B5 , 0x22ED , 0x0000), 3431 3424 DEADTRANS( 0x0338 , 0x2ADD , 0x2ADC , 0x0000), 3432 3433 3434 3435 3436 3437 3438 3439 3440 3441 3425 0, 0 3442 3426 }; … … 3444 3428 3445 3429 static ALLOC_SECTION_LDATA KBDTABLES KbdTables = { 3446 /* 3447 * Modifier keys 3448 */ 3430 // Modifier keys 3431 3449 3432 &CharModifiers, 3450 3433 3451 /* 3452 *Characters tables3453 */ 3434 3435 // Characters tables 3436 3454 3437 aVkToWcharTable, 3455 3438 3456 /* 3457 * Diacritics 3458 */ 3439 3440 // Diakritika vorhanden 3441 3459 3442 aDeadKey, 3460 3443 3461 /* 3462 * Names ofKeys3463 */ 3444 3445 // Namen der Keys 3446 3464 3447 aKeyNames, 3465 3448 aKeyNamesExt, 3466 3449 aKeyNamesDead, 3467 3450 3468 /* 3469 * Scan codes toVirtual Keys3470 */ 3451 3452 // Scancodes zu Virtual Keys 3453 3471 3454 ausVK, 3472 3455 sizeof(ausVK) / sizeof(ausVK[0]), … … 3474 3457 aE1VscToVk, 3475 3458 3476 /* 3477 * Locale-specific special processing 3478 * KLLF_ALTGR damit AltGr = Strg+Alt 3479 */ 3459 3460 // KLLF_ALTGR damit AltGr = Strg+Alt 3461 3480 3462 MAKELONG(KLLF_ALTGR, KBD_VERSION), 3481 3463 3482 /* 3483 * Ligatures 3484 */ 3464 3465 // keine Ligaturen 3466 3485 3467 0, 3486 3468 0, … … 3488 3470 }; 3489 3471 3472 3490 3473 PKBDTABLES KbdLayerDescriptor(VOID) 3491 3474 {
