Changeset 2205

Show
Ignore:
Timestamp:
03/21/10 03:03:18 (3 years ago)
Author:
florian
Message:
 
Files:
1 modified

Legend:

Unmodified
Added
Removed
  • windows/kbdneo2/Quelldateien/kbdneo2.c

    r2202 r2205  
    1 /***************************************************************************\ 
     1/* **************************************************************************\ 
    22* Module Name: KBDNEO2.C 
    33* Deutsches ergonomische Layout Neo 2.0 
    4 \***************************************************************************/ 
     4\************************************************************************** */ 
    55 
    66#include <windows.h> 
     
    1616#endif 
    1717 
    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\************************************************************************** */ 
    2122 
    2223static ALLOC_SECTION_LDATA USHORT ausVK[] = { 
     
    2930    T30, T31, T32, T33, T34, T35, 
    3031 
    31     /* 
    32      * Right-hand Shift key must have KBDEXT bit set. 
    33      */ 
     32 
     33// Rechtes Shift muss KBDEXT bit haben 
     34 
    3435    T36 | KBDEXT, 
    3536 
     
    3940    T3F, T40, T41, T42, T43, T44, 
    4041 
    41     /* 
    42      * NumLock Key: 
    43      *     KBDEXT     - VK_NUMLOCK is an Extended key 
    44      *     KBDMULTIVK - VK_NUMLOCK or 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, 
    4748 
    4849    T46 | KBDMULTIVK, 
    4950 
     51         
    5052    /* 
    5153     * Number Pad keys: 
     
    5355     *     KBDSPECIAL - require special processing by Windows 
    5456     */ 
    55     T47 | KBDNUMPAD | KBDSPECIAL,   // Numpad 7 (Home) 
     57     
     58        T47 | KBDNUMPAD | KBDSPECIAL,   // Numpad 7 (Home) 
    5659    T48 | KBDNUMPAD | KBDSPECIAL,   // Numpad 8 (Up), 
    5760    T49 | KBDNUMPAD | KBDSPECIAL,   // Numpad 9 (PgUp), 
     
    7578 
    7679}; 
     80 
    7781 
    7882static ALLOC_SECTION_LDATA VSC_VK aE0VscToVk[] = { 
     
    118122}; 
    119123 
     124 
    120125static ALLOC_SECTION_LDATA VSC_VK aE1VscToVk[] = { 
    121126        { 0x1D, Y1D                       },  // Pause 
     
    123128}; 
    124129 
    125 /***************************************************************************\ 
     130 
     131/* **************************************************************************\ 
    126132* aVkToBits[]  - map Virtual Keys to Modifier Bits 
    127133* 
    128 * See kbd.h for a full description. 
    129 \***************************************************************************/ 
     134* Siehe kbd.h f�r mehr Infos 
     135\************************************************************************** */ 
     136 
    130137// Es wird nicht zwischen linken und/oder rechtem Modifier unterschieden 
     138 
    131139static ALLOC_SECTION_LDATA VK_TO_BIT aVkToBits[] = { 
    132140    { VK_SHIFT          ,       KBDSHIFT        }, 
     
    138146}; 
    139147 
    140 /***************************************************************************\ 
     148 
     149/* **************************************************************************\ 
    141150* aModification[]  - map character modifier bits to modification number 
    142151* 
    143 * See kbd.h for a full description. 
    144 * 
    145 \***************************************************************************/ 
     152* Siehe kbd.h f�r mehr Infos 
     153\************************************************************************** */ 
    146154 
    147155static ALLOC_SECTION_LDATA MODIFIERS CharModifiers = { 
     
    188196}; 
    189197 
    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 
    191203* 
    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 
    200207* 
    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\************************************************************************** */ 
    219213 
    220214static ALLOC_SECTION_LDATA VK_TO_WCHARS6 aVkToWch6[] = { 
     
    294288}; 
    295289 
    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 
    300291// Entgegen der neo20.txt vorgesehene Belegung 1,2,3,4,5,6 ist hier 1,4,3,2 umgesetzt: 
    301  
    302  
    303292static ALLOC_SECTION_LDATA VK_TO_WCHARS4 aVkToWch4[] = { 
    304293//                              | CapsLock      |                       | SHIFT         | KANA          | NEU           | 
     
    322311}; 
    323312 
     313 
    324314// Hier m�ssen die verwendeten WChar_Tables vorkommen; Numpad MUSS letzte Zeile sein. 
    325315static ALLOC_SECTION_LDATA VK_TO_WCHAR_TABLE aVkToWcharTable[] = { 
     
    331321}; 
    332322 
    333 /***************************************************************************\ 
     323 
     324/* **************************************************************************\ 
    334325* aKeyNames[], aKeyNamesExt[]  - Virtual Scancode to Key Name tables 
    335326* 
    336327* Table attributes: Ordered Scan (by scancode), null-terminated 
    337328* 
    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\************************************************************************** */ 
    341332 
    342333static ALLOC_SECTION_LDATA VSC_LPWSTR aKeyNames[] = { 
     
    384375}; 
    385376 
     377 
    386378static ALLOC_SECTION_LDATA VSC_LPWSTR aKeyNamesExt[] = { 
    387379    0x1c,    L"EINGABE (ZEHNERTASTATUR)", 
     
    410402}; 
    411403 
     404 
    412405static ALLOC_SECTION_LDATA DEADKEY_LPWSTR aKeyNamesDead[] = { 
    413406//Tottaste 1 (links neben 1) 
     
    426419    L"\x1ffe"    L"SPIRITUS_ASPER", 
    427420    L"\x00AF"    L"MAKRON", 
    428          
     421 
    429422//Tottaste 3 (rechts neben �ߓ) 
    430423    L"\x00B4"    L"AKUT", 
     
    433426    L"\x02DD"    L"DOPPEL_AKUT",  
    434427    L"\x1fbf"    L"SPIRITUS_LENIS", 
    435     L"\x02D8"    L"BREVE",       
    436     
     428    L"\x02D8"    L"BREVE",          
    437429    NULL 
    438430}; 
     431 
    439432 
    440433static ALLOC_SECTION_LDATA DEADKEY aDeadKey[] = { 
     
    444437//     
    445438//    Bei Doppelbelegungen wird erster Treffer genommen 
    446 //     
    447  
     439// 
     440// 
    448441//Deadkeys 
    449442// Nachfolgend Tafeln f�r die diakritschen Zeichen 
     
    483476DEADTRANS( L'Z'   , L'^'   , 0x1e90 , 0x0000), 
    484477DEADTRANS( L'z'   , L'^'   , 0x1e91 , 0x0000), 
    485 DEADTRANS( L'?'   , L'^'   , 0x02c0 , 0x0000),  // ab hier lang.module  
     478DEADTRANS( L'?'   , L'^'   , 0x02c0 , 0x0000), // ab hier lang.module  
    486479DEADTRANS( 0x00d7 , L'^'   , 0x02c0 , 0x0000), 
    487 DEADTRANS( 0x03b1 , L'^'   , 0x1d45 , 0x0000),   //Greek_alpha   
    488 DEADTRANS( 0x03b5 , L'^'   , 0x1d4b , 0x0000),   //Greek_epsilon 
    489 DEADTRANS( 0x03c5 , L'^'   , 0x1db7 , 0x0000),   //Greek_upsilon 
    490 DEADTRANS( 0x03d5 , L'^'   , 0x1db2 , 0x0000),   // Ende lang.module 
    491 DEADTRANS( L'1'   , L'^'   , 0x00b9 , 0x0000),  //ab hier hochgestelltes 
     480DEADTRANS( 0x03b1 , L'^'   , 0x1d45 , 0x0000), //Greek_alpha   
     481DEADTRANS( 0x03b5 , L'^'   , 0x1d4b , 0x0000), //Greek_epsilon 
     482DEADTRANS( 0x03c5 , L'^'   , 0x1db7 , 0x0000), //Greek_upsilon 
     483DEADTRANS( 0x03d5 , L'^'   , 0x1db2 , 0x0000), // Ende lang.module 
     484DEADTRANS( L'1'   , L'^'   , 0x00b9 , 0x0000), //ab hier hochgestelltes 
    492485DEADTRANS( L'2'   , L'^'   , 0x00b2 , 0x0000), 
    493486DEADTRANS( L'3'   , L'^'   , 0x00b3 , 0x0000), 
     
    507500 
    508501//Caron (ferfig f�r en_US.UTF-8 und lang.module) 
    509 DEADTRANS( L' '   , 0x02c7 , 0x02c7 , 0x0000),  //Caron  
    510 DEADTRANS( 0x02c7 , 0x02c7 , 0x030C , 0x0000),  //2x f�r Combining 
     502DEADTRANS( L' '   , 0x02c7 , 0x02c7 , 0x0000), //Caron  
     503DEADTRANS( 0x02c7 , 0x02c7 , 0x030C , 0x0000), //2x f�r Combining 
    511504DEADTRANS( L'A'   , 0x02c7 , 0x01CD , 0x0000), 
    512505DEADTRANS( L'a'   , 0x02c7 , 0x01CE , 0x0000), 
     
    588581 
    589582//Punkt Dr�ber & Mittenpunkt  (ferfig f�r en_US.UTF-8 und lang.module) 
    590 DEADTRANS( L' '   , 0x02d9 , 0x02d9 , 0x0000),  //Punkt Dr�ber 
    591 DEADTRANS( 0x02d9 , 0x02d9 , 0x0307 , 0x0000),  //2x f�r Combining  
    592 DEADTRANS( L'L'   , 0x02d9 , 0x013F , 0x0000),  //Mittenpunkt 
    593 DEADTRANS( L'l'   , 0x02d9 , 0x0140 , 0x0000),  //Mittenpunkt 
    594 DEADTRANS( 0x017f , 0x02d9 , 0x1E9B , 0x0000),  // Lang-s mit Punkt dr�ber 
     583DEADTRANS( L' '   , 0x02d9 , 0x02d9 , 0x0000), //Punkt Dr�ber 
     584DEADTRANS( 0x02d9 , 0x02d9 , 0x0307 , 0x0000), //2x f�r Combining  
     585DEADTRANS( L'L'   , 0x02d9 , 0x013F , 0x0000), //Mittenpunkt 
     586DEADTRANS( L'l'   , 0x02d9 , 0x0140 , 0x0000), //Mittenpunkt 
     587DEADTRANS( 0x017f , 0x02d9 , 0x1E9B , 0x0000), // Lang-s mit Punkt dr�ber 
    595588DEADTRANS( L'A'   , 0x02d9 , 0x0226 , 0x0000), 
    596589DEADTRANS( L'a'   , 0x02d9 , 0x0227 , 0x0000), 
     
    680673 
    681674//Punkt Darunter (ferfig f�r en_US.UTF-8 und lang.module) 
    682 DEADTRANS( L' '   , L'.' , L'.'     , 0x0000),  //Puntk darunter 
    683 DEADTRANS( L'.'   , L'.' , 0x0323   , 0x0000),  //2x f�r Combining 
     675DEADTRANS( L' '   , L'.' , L'.'     , 0x0000), //Punkt darunter 
     676DEADTRANS( L'.'   , L'.' , 0x0323   , 0x0000), //2x f�r Combining 
    684677DEADTRANS( L'A'   , L'.' , 0x1ea0   , 0x0000), 
    685678DEADTRANS( L'a'   , L'.' , 0x1ea1   , 0x0000), 
     
    34303423DEADTRANS(      0x0338  ,       0x22B5  ,       0x22ED  ,       0x0000), 
    34313424DEADTRANS(      0x0338  ,       0x2ADD  ,       0x2ADC  ,       0x0000), 
    3432  
    3433  
    3434  
    3435  
    3436  
    3437  
    3438  
    3439  
    3440  
    34413425    0, 0 
    34423426}; 
     
    34443428 
    34453429static ALLOC_SECTION_LDATA KBDTABLES KbdTables = { 
    3446 /* 
    3447 * Modifier keys 
    3448 */ 
     3430// Modifier keys 
     3431 
    34493432    &CharModifiers, 
    34503433 
    3451 /* 
    3452 * Characters tables 
    3453 */ 
     3434         
     3435// Characters tables 
     3436 
    34543437    aVkToWcharTable, 
    34553438 
    3456 /* 
    3457 * Diacritics 
    3458 */ 
     3439         
     3440// Diakritika vorhanden 
     3441 
    34593442    aDeadKey, 
    34603443 
    3461 /* 
    3462 * Names of Keys 
    3463 */ 
     3444         
     3445// Namen der Keys 
     3446 
    34643447    aKeyNames, 
    34653448    aKeyNamesExt, 
    34663449    aKeyNamesDead, 
    34673450 
    3468 /* 
    3469 * Scan codes to Virtual Keys 
    3470 */ 
     3451         
     3452// Scancodes zu Virtual Keys 
     3453 
    34713454    ausVK, 
    34723455    sizeof(ausVK) / sizeof(ausVK[0]), 
     
    34743457    aE1VscToVk, 
    34753458 
    3476 /* 
    3477 * Locale-specific special processing 
    3478 * KLLF_ALTGR damit AltGr = Strg+Alt  
    3479 */ 
     3459         
     3460// KLLF_ALTGR damit AltGr = Strg+Alt  
     3461 
    34803462    MAKELONG(KLLF_ALTGR, KBD_VERSION), 
    34813463 
    3482 /* 
    3483 * Ligatures 
    3484 */ 
     3464         
     3465// keine Ligaturen 
     3466 
    34853467    0, 
    34863468    0, 
     
    34883470}; 
    34893471 
     3472 
    34903473PKBDTABLES KbdLayerDescriptor(VOID) 
    34913474{