test: kbdnecnt.c Source File

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

# kbdnecnt.c

Go to the documentation of this file.

    00001 #if defined(JAPAN) && defined(_PC98_)
    00002 /***************************************************************************\
    00003 * Module Name: kbdnec.c
    00004 *
    00005 * Copyright (c) 1985-92, Microsoft Corporation
    00006 *
    00007 * History:
    00008 \***************************************************************************/
    00009 #else  // _PC98_
    00010 /***************************************************************************\
    00011 * Module Name: kbd106.c
    00012 *
    00013 * Copyright (c) 1985-92, Microsoft Corporation
    00014 *
    00015 * History:
    00016 \***************************************************************************/
    00017 #endif // _PC98_
    00018
    00019 #include <windows.h>
    00020 #include <ime.h>
    00021 #include "vkoem.h"
    00022 #include "kbdjpn.h"
    00023 #if defined(JAPAN) && defined(_PC98_)
    00024 #include "kbdnecNT.h"
    00025 #else  // _PC98_
    00026 #include "kbd106.h"
    00027 #endif // _PC98_
    00028
    00029 #if defined(_M_IA64)
    00030 #pragma section(".data")
    00031 #define ALLOC_SECTION_LDATA __declspec(allocate(".data"))
    00032 #else
    00033 #pragma data_seg(".data")
    00034 #define ALLOC_SECTION_LDATA
    00035 #endif
    00036
    00037 #if defined(JAPAN) && defined(_PC98_)
    00038 /***************************************************************************\
    00039 * ausVK[] - Virtual Scan Code to Virtual Key conversion table for NEC 106
    00040 \***************************************************************************/
    00041 #else // _PC98_
    00042 /***************************************************************************\
    00043 * ausVK[] - Virtual Scan Code to Virtual Key conversion table for 106
    00044 \***************************************************************************/
    00045 #endif // _PC98_
    00046
    00047 static ALLOC_SECTION_LDATA USHORT ausVK[] = {
    00048     T00, T01, T02, T03, T04, T05, T06, T07,
    00049     T08, T09, T0A, T0B, T0C, T0D, T0E, T0F,
    00050     T10, T11, T12, T13, T14, T15, T16, T17,
    00051     T18, T19, T1A, T1B, T1C, T1D, T1E, T1F,
    00052     T20, T21, T22, T23, T24, T25, T26, T27,
    00053 #if defined(JAPAN) && defined(_PC98_)
    00054     T28, T29, T2A, T2B, T2C, T2D, T2E, T2F,
    00055 #else // _PC98_
    00056     T28,
    00057
    00058     /*
    00059      * Hankaku/Zenkaku/Kanji key must have KBDSPECIAL bit set (NLS key)
    00060      */
    00061     T29 | KBDSPECIAL,
    00062
    00063               T2A, T2B, T2C, T2D, T2E, T2F,
    00064 #endif // _PC98_
    00065     T30, T31, T32, T33, T34, T35,
    00066
    00067     /*
    00068      * Right-hand Shift key must have KBDEXT bit set.
    00069      */
    00070     T36 | KBDEXT,
    00071
    00072 #if defined(JAPAN) && defined(_PC98_)
    00073     T37,
    00074 #else //_PC98_
    00075     /*
    00076      * numpad_* + Shift/Alt -> SnapShot
    00077      */
    00078     T37 | KBDMULTIVK,
    00079 #endif // _PC98_
    00080
    00081     T38, T39,
    00082
    00083 #if defined(JAPAN) && defined(_PC98_)
    00084     T3A,
    00085 #else //_PC98_
    00086     /*
    00087      * Alphanumeric/CapsLock key must have KBDSPECIAL bit set (NLS key)
    00088      */
    00089     T3A | KBDSPECIAL,
    00090 #endif // _PC98_
    00091
    00092                    T3B, T3C, T3D, T3E, T3F,
    00093     T40, T41, T42, T43, T44,
    00094
    00095     /*
    00096      * NumLock Key:
    00097      *     KBDEXT     - VK_NUMLOCK is an Extended key
    00098      *     KBDMULTIVK - VK_NUMLOCK or VK_PAUSE (without or with CTRL)
    00099      */
    00100     T45 | KBDEXT | KBDMULTIVK,
    00101
    00102 #if defined(JAPAN) && defined(_PC98_)
    00103     T46,
    00104 #else //_PC98_
    00105     T46 | KBDMULTIVK,
    00106 #endif // _PC98_
    00107
    00108     /*
    00109      * Number Pad keys:
    00110      *     KBDNUMPAD  - digits 0-9 and decimal point.
    00111      *     KBDSPECIAL - require special processing by Windows
    00112      */
    00113     T47 | KBDNUMPAD | KBDSPECIAL,   // Numpad 7 (Home)
    00114     T48 | KBDNUMPAD | KBDSPECIAL,   // Numpad 8 (Up),
    00115     T49 | KBDNUMPAD | KBDSPECIAL,   // Numpad 9 (PgUp),
    00116     T4A,
    00117     T4B | KBDNUMPAD | KBDSPECIAL,   // Numpad 4 (Left),
    00118     T4C | KBDNUMPAD | KBDSPECIAL,   // Numpad 5 (Clear),
    00119     T4D | KBDNUMPAD | KBDSPECIAL,   // Numpad 6 (Right),
    00120     T4E,
    00121     T4F | KBDNUMPAD | KBDSPECIAL,   // Numpad 1 (End),
    00122     T50 | KBDNUMPAD | KBDSPECIAL,   // Numpad 2 (Down),
    00123     T51 | KBDNUMPAD | KBDSPECIAL,   // Numpad 3 (PgDn),
    00124     T52 | KBDNUMPAD | KBDSPECIAL,   // Numpad 0 (Ins),
    00125     T53 | KBDNUMPAD | KBDSPECIAL,   // Numpad . (Del),
    00126
    00127 #if defined(JAPAN) && defined(_PC98_)
    00128     T54, T55, T56, T57, T58,
    00129
    00130     T59 | KBDSPECIAL,               // NEC TenKey EQU (VK_SCROLL)
    00131
    00132     T5A | KBDSPECIAL,               // NEC No-Conversion key     // NLS key
    00133
    00134     T5B, T5C, T5D, T5E, T5F
    00135 #else //_PC98_
    00136     T54, T55, T56, T57, T58, T59, T5A, T5B,
    00137     T5C, T5D, T5E, T5F, T60, T61, T62, T63,
    00138     T64, T65, T66, T67, T68, T69, T6A, T6B,
    00139     T6C, T6D, T6E, T6F,
    00140
    00141     /*
    00142      * Hiragana/Katakana/Roman key must have KBDSPECIAL bit set (NLS key)
    00143      */
    00144     T70 | KBDSPECIAL,
    00145
    00146                              T71, T72, T73,
    00147     T74, T75, T76, T77, T78,
    00148
    00149     /*
    00150      * Conversion key must have KBDSPECIAL bit set (NLS key)
    00151      */
    00152     T79 | KBDSPECIAL,
    00153
    00154                                   T7A,
    00155
    00156     /*
    00157      * Non-Conversion key must have KBDSPECIAL bit set (NLS key)
    00158      */
    00159     T7B | KBDSPECIAL,
    00160
    00161     T7C, T7D, T7E, T7F
    00162
    00163 #endif // _PC98_
    00164 };
    00165
    00166 static ALLOC_SECTION_LDATA VSC_VK aE0VscToVk[] = {
    00167         { 0x1C, X1C | KBDEXT              },  // Numpad Enter
    00168 #if defined(JAPAN) && defined(_PC98_)
    00169         { 0x1D, X1D | KBDEXT | KBDSPECIAL },  // Katakana key   // NLS key
    00170 #else //_PC98_
    00171         { 0x1D, X1D | KBDEXT              },  // RControl
    00172 #endif // _PC98_
    00173         { 0x35, X35 | KBDEXT              },  // Numpad Divide
    00174         { 0x37, X37 | KBDEXT              },  // Snapshot
    00175 #if defined(JAPAN) && defined(_PC98_)
    00176         { 0x38, X38 | KBDEXT | KBDSPECIAL },  // Kanji key      // NLS key
    00177 #else //_PC98_
    00178         { 0x38, X38 | KBDEXT              },  // RMenu
    00179 #endif // _PC98_
    00180         { 0x46, X46 | KBDEXT              },  // Break (Ctrl + Pause)
    00181 #if defined(JAPAN) && defined(_PC98_)
    00182         { 0x47, X47 | KBDEXT | KBDSPECIAL },  // Home //_PC98_ for CLEAR key
    00183 #else //_PC98_
    00184         { 0x47, X47 | KBDEXT              },  // Home
    00185 #endif // _PC98_
    00186         { 0x48, X48 | KBDEXT              },  // Up
    00187         { 0x49, X49 | KBDEXT              },  // Prior
    00188         { 0x4B, X4B | KBDEXT              },  // Left
    00189         { 0x4D, X4D | KBDEXT              },  // Right
    00190 #if defined(JAPAN) && defined(_PC98_)
    00191         { 0x4F, X4F | KBDEXT | KBDSPECIAL },  // End  //_PC98_ for HELP key
    00192 #else //_PC98_
    00193         { 0x4F, X4F | KBDEXT              },  // End
    00194 #endif // _PC98_
    00195         { 0x50, X50 | KBDEXT              },  // Down
    00196         { 0x51, X51 | KBDEXT              },  // Next
    00197         { 0x52, X52 | KBDEXT              },  // Insert
    00198         { 0x53, X53 | KBDEXT              },  // Delete
    00199         { 0x5B, X5B | KBDEXT              },  // Left Win
    00200         { 0x5C, X5C | KBDEXT              },  // Right Win
    00201         { 0x5D, X5D | KBDEXT              },  // Application
    00202         { 0,      0                       }
    00203 };
    00204
    00205 static ALLOC_SECTION_LDATA VSC_VK aE1VscToVk[] = {
    00206         { 0x1D, Y1D                       },  // Pause
    00207         { 0   ,   0                       }
    00208 };
    00209
    00210 /***************************************************************************\
    00211 * aVkToBits[]  - map Virtual Keys to Modifier Bits
    00212 *
    00213 * See kbd.h for a full description.
    00214 *
    00215 * US Keyboard has only three shifter keys:
    00216 *     SHIFT (L & R) affects alphabnumeric keys,
    00217 *     CTRL  (L & R) is used to generate control characters
    00218 *     ALT   (L & R) used for generating characters by number with numpad
    00219 \***************************************************************************/
    00220
    00221 static ALLOC_SECTION_LDATA VK_TO_BIT aVkToBits[] = {
    00222     { VK_SHIFT,   KBDSHIFT },
    00223     { VK_CONTROL, KBDCTRL  },
    00224     { VK_MENU,    KBDALT   },
    00225     { VK_KANA,    KBDKANA  },
    00226     { 0,          0        }
    00227 };
    00228
    00229 /***************************************************************************\
    00230 * aModification[]  - map character modifier bits to modification number
    00231 *
    00232 * See kbd.h for a full description.
    00233 *
    00234 \***************************************************************************/
    00235
    00236 static ALLOC_SECTION_LDATA MODIFIERS CharModifiers = {
    00237     &aVkToBits[0],
    00238     11,
    00239     {
    00240     //  Modification# //  Keys Pressed  : Explanation
    00241     //  ============= // ============== : =============================
    00242         0,            //                : unshifted characters
    00243         1,            //          SHIFT : capitals, ~!@#$%^&*()_+{}:"<>? etc.
    00244         4,            //     CTRL       : control characters
    00245         6,            //     CTRL SHIFT :
    00246         SHFT_INVALID, // ALT            : invalid
    00247         SHFT_INVALID, // ALT      SHIFT : invalid
    00248         SHFT_INVALID, // ALT CTRL       : invalid
    00249         SHFT_INVALID, // ALT CTRL SHIFT : invalid
    00250         2,            //KANA
    00251         3,            //KANA      SHIFT
    00252         5,            //KANA CTRL
    00253         7             //KANA CTRL SHIFT
    00254     }
    00255 };
    00256
    00257 /***************************************************************************\
    00258 *
    00259 * aVkToWch2[]  - Virtual Key to WCHAR translation for 2 shift states
    00260 * aVkToWch3[]  - Virtual Key to WCHAR translation for 3 shift states
    00261 * aVkToWch4[]  - Virtual Key to WCHAR translation for 4 shift states
    00262 *
    00263 * Table attributes: Unordered Scan, null-terminated
    00264 *
    00265 * Search this table for an entry with a matching Virtual Key to find the
    00266 * corresponding unshifted and shifted WCHAR characters.
    00267 *
    00268 * Reserved VirtualKey values (first column)
    00269 *     -1            - this line contains dead characters (diacritic)
    00270 *     0             - terminator
    00271 *
    00272 * Reserved Attribute values (second column)
    00273 *     CAPLOK        - CapsLock affects this key like Shift
    00274 *     KANALOK       - The KANA-LOCK key affects this key like KANA
    00275 *
    00276 * Reserved character values (third through last column)
    00277 *     WCH_NONE      - No character
    00278 *     WCH_DEAD      - Dead character (diacritic) value is in next line
    00279 *
    00280 \***************************************************************************/
    00281
    00282 static ALLOC_SECTION_LDATA VK_TO_WCHARS4 aVkToWch4[] = {
    00283     //                               |          |   SHIFT  |  KANA  | K+SHFT |
    00284     //                               |          |==========|========|========|
    00285 #if defined(JAPAN) && defined(_PC98_)
    00286     {'0'          ,          KANALOK ,'0'       ,'0'       ,WCH_WA  ,WCH_WO  }, //_PC98_
    00287 #else //_PC98_
    00288     {'0'          ,          KANALOK ,'0'       ,WCH_NONE  ,WCH_WA  ,WCH_WO  },
    00289 #endif // _PC98_
    00290     {'1'          ,          KANALOK ,'1'       ,'!'       ,WCH_NU  ,WCH_NU  },
    00291     {'3'          ,          KANALOK ,'3'       ,'#'       ,WCH_A   ,WCH_AA  },
    00292     {'4'          ,          KANALOK ,'4'       ,'$'       ,WCH_U   ,WCH_UU  },
    00293     {'5'          ,          KANALOK ,'5'       ,'%'       ,WCH_E   ,WCH_EE  },
    00294 #if defined(JAPAN) && defined(_PC98_)
    00295     {'7'          ,          KANALOK ,'7'       ,'\''      ,WCH_YA  ,WCH_YAA }, //_PC98_
    00296 #else //_PC98_
    00297     {'7'          ,          KANALOK ,'7'       ,0x27      ,WCH_YA  ,WCH_YAA },
    00298 #endif // _PC98_
    00299     {'8'          ,          KANALOK ,'8'       ,'('       ,WCH_YU  ,WCH_YUU },
    00300     {'9'          ,          KANALOK ,'9'       ,')'       ,WCH_YO  ,WCH_YOO },
    00301     {'A'          , CAPLOK | KANALOK ,'a'       ,'A'       ,WCH_TI  ,WCH_TI  },
    00302     {'B'          , CAPLOK | KANALOK ,'b'       ,'B'       ,WCH_KO  ,WCH_KO  },
    00303     {'C'          , CAPLOK | KANALOK ,'c'       ,'C'       ,WCH_SO  ,WCH_SO  },
    00304     {'D'          , CAPLOK | KANALOK ,'d'       ,'D'       ,WCH_SI  ,WCH_SI  },
    00305     {'E'          , CAPLOK | KANALOK ,'e'       ,'E'       ,WCH_I   ,WCH_II  },
    00306     {'F'          , CAPLOK | KANALOK ,'f'       ,'F'       ,WCH_HA  ,WCH_HA  },
    00307     {'G'          , CAPLOK | KANALOK ,'g'       ,'G'       ,WCH_KI  ,WCH_KI  },
    00308     {'H'          , CAPLOK | KANALOK ,'h'       ,'H'       ,WCH_KU  ,WCH_KU  },
    00309     {'I'          , CAPLOK | KANALOK ,'i'       ,'I'       ,WCH_NI  ,WCH_NI  },
    00310     {'J'          , CAPLOK | KANALOK ,'j'       ,'J'       ,WCH_MA  ,WCH_MA  },
    00311     {'K'          , CAPLOK | KANALOK ,'k'       ,'K'       ,WCH_NO  ,WCH_NO  },
    00312     {'L'          , CAPLOK | KANALOK ,'l'       ,'L'       ,WCH_RI  ,WCH_RI  },
    00313     {'M'          , CAPLOK | KANALOK ,'m'       ,'M'       ,WCH_MO  ,WCH_MO  },
    00314     {'N'          , CAPLOK | KANALOK ,'n'       ,'N'       ,WCH_MI  ,WCH_MI  },
    00315     {'O'          , CAPLOK | KANALOK ,'o'       ,'O'       ,WCH_RA  ,WCH_RA  },
    00316     {'P'          , CAPLOK | KANALOK ,'p'       ,'P'       ,WCH_SE  ,WCH_SE  },
    00317     {'Q'          , CAPLOK | KANALOK ,'q'       ,'Q'       ,WCH_TA  ,WCH_TA  },
    00318     {'R'          , CAPLOK | KANALOK ,'r'       ,'R'       ,WCH_SU  ,WCH_SU  },
    00319     {'S'          , CAPLOK | KANALOK ,'s'       ,'S'       ,WCH_TO  ,WCH_TO  },
    00320     {'T'          , CAPLOK | KANALOK ,'t'       ,'T'       ,WCH_KA  ,WCH_KA  },
    00321     {'U'          , CAPLOK | KANALOK ,'u'       ,'U'       ,WCH_NA  ,WCH_NA  },
    00322     {'V'          , CAPLOK | KANALOK ,'v'       ,'V'       ,WCH_HI  ,WCH_HI  },
    00323     {'W'          , CAPLOK | KANALOK ,'w'       ,'W'       ,WCH_TE  ,WCH_TE  },
    00324     {'X'          , CAPLOK | KANALOK ,'x'       ,'X'       ,WCH_SA  ,WCH_SA  },
    00325     {'Y'          , CAPLOK | KANALOK ,'y'       ,'Y'       ,WCH_NN  ,WCH_NN  },
    00326     {'Z'          , CAPLOK | KANALOK ,'z'       ,'Z'       ,WCH_TU  ,WCH_TUU },
    00327     {VK_OEM_1     ,          KANALOK ,':'       ,'*'       ,WCH_KE  ,WCH_KE  },
    00328     {VK_OEM_2     ,          KANALOK ,'/'       ,'?'       ,WCH_ME  ,WCH_MD  },
    00329 #if defined(JAPAN) && defined(_PC98_)
    00330 #else //_PC98_
    00331     {VK_OEM_3     ,          KANALOK ,'@'       ,'`'       ,WCH_VS  ,WCH_VS  },
    00332     {VK_OEM_7     ,          KANALOK ,'^'       ,'~'       ,WCH_HE  ,WCH_HE  },
    00333     {VK_OEM_8     , 0                ,WCH_NONE  ,WCH_NONE  ,WCH_NONE,WCH_NONE},
    00334 #endif // _PC98_
    00335     {VK_OEM_COMMA ,          KANALOK ,','       ,'<'       ,WCH_NE  ,WCH_IC  },
    00336     {VK_OEM_PERIOD,          KANALOK ,'.'       ,'>'       ,WCH_RU  ,WCH_IP  },
    00337     {VK_OEM_PLUS  ,          KANALOK ,';'       ,'+'       ,WCH_RE  ,WCH_RE  },
    00338     {VK_TAB       , 0                ,'\t'      ,'\t'      ,'\t'    ,'\t'    },
    00339     {VK_ADD       , 0                ,'+'       ,'+'       ,'+'     ,'+'     },
    00340     {VK_DECIMAL   , 0                ,'.'       ,'.'       ,'.'     ,'.'     },
    00341     {VK_DIVIDE    , 0                ,'/'       ,'/'       ,'/'     ,'/'     },
    00342     {VK_MULTIPLY  , 0                ,'*'       ,'*'       ,'*'     ,'*'     },
    00343     {VK_SUBTRACT  , 0                ,'-'       ,'-'       ,'-'     ,'-'     },
    00344 #if defined(JAPAN) && defined(_PC98_)
    00345     {VK_SEPARATOR , 0                ,','       ,','       ,','     ,','     }, //<NEC_OCDE OEM
    00346     {VK_OEM_NEC_EQUAL,    0          ,'='       ,'='       ,'='     ,'='     }, //<_PC98_ OEM
    00347     {VK_NUMPAD0   , 0                ,'0'       ,'0'       ,'0'     ,'0'     },//_PC98_
    00348     {VK_NUMPAD1   , 0                ,'1'       ,'1'       ,'1'     ,'1'     },//_PC98_
    00349     {VK_NUMPAD2   , 0                ,'2'       ,'2'       ,'2'     ,'2'     },//_PC98_
    00350     {VK_NUMPAD3   , 0                ,'3'       ,'3'       ,'3'     ,'3'     },//_PC98_
    00351     {VK_NUMPAD4   , 0                ,'4'       ,'4'       ,'4'     ,'4'     },//_PC98_
    00352     {VK_NUMPAD5   , 0                ,'5'       ,'5'       ,'5'     ,'5'     },//_PC98_
    00353     {VK_NUMPAD6   , 0                ,'6'       ,'6'       ,'6'     ,'6'     },//_PC98_
    00354     {VK_NUMPAD7   , 0                ,'7'       ,'7'       ,'7'     ,'7'     },//_PC98_
    00355     {VK_NUMPAD8   , 0                ,'8'       ,'8'       ,'8'     ,'8'     },//_PC98_
    00356     {VK_NUMPAD9   , 0                ,'9'       ,'9'       ,'9'     ,'9'     },//_PC98_
    00357 #endif // _PC98_
    00358     {0            , 0                ,0         ,0         ,0       ,0       }
    00359 };
    00360
    00361 static ALLOC_SECTION_LDATA VK_TO_WCHARS6 aVkToWch6[] = {
    00362     //                      |          |   SHIFT  |  KANA  | K+SHFT |  CONTROL  |  K+CTRL   |
    00363     //                      |          |==========|========|========|===========|===========|
    00364     {VK_BACK      , 0       ,'\b'      ,'\b'      ,'\b'    ,'\b'    , 0x7f      , 0x7f      },
    00365     {VK_CANCEL    , 0       ,0x03      ,0x03      ,0x03    ,0x03    , 0x03      , 0x03      },
    00366     {VK_ESCAPE    , 0       ,0x1b      ,0x1b      ,0x1b    ,0x1b    , 0x1b      , 0x1b      },
    00367 #if defined(JAPAN) && defined(_PC98_)
    00368     {VK_OEM_3     , KANALOK ,'@'       ,'~'       ,WCH_VS  ,WCH_VS  , 0x00      , 0x00      },//_PC98_ #931208
    00369     {VK_OEM_4     , KANALOK ,'['       ,'{'       ,WCH_SVS ,WCH_OB  , 0x1b      , 0x1b      },//_PC98_
    00370     {VK_OEM_4     , KANALOK ,'['       ,'{'       ,WCH_SVS ,WCH_OB  , 0x1b      , 0x1b      },//_PC98_
    00371     {VK_OEM_5     , KANALOK ,'\\'      ,'|'       ,WCH_PS  ,WCH_PS  , 0x1c      , 0x1c      },//_PC98_
    00372     {VK_OEM_6     , KANALOK ,']'       ,'}'       ,WCH_MU  ,WCH_CB  , 0x1d      , 0x1d      },//_PC98_
    00373     {VK_OEM_7     , KANALOK ,'^'       ,'`'       ,WCH_HE  ,WCH_HE  , 0x1e      , 0x1e      },//_PC98_ #931208
    00374     {VK_OEM_8     , KANALOK ,WCH_NONE  ,'_'       ,WCH_RO  ,WCH_RO  , 0x1f      , 0x1f      },//_PC98_ #931208
    00375 #else //_PC98_
    00376     {VK_OEM_4     , KANALOK ,'['       ,'{'       ,WCH_SVS ,WCH_OB  , 0x1b      , 0x1b      },
    00377     {VK_OEM_5     , KANALOK ,'\\'      ,'|'       ,WCH_PS  ,WCH_PS  , 0x1c      , 0x1c      },
    00378     {VK_OEM_102   , KANALOK ,'\\'      ,'_'       ,WCH_RO  ,WCH_RO  , 0x1c      , 0x1c      },
    00379     {VK_OEM_6     , KANALOK ,']'       ,'}'       ,WCH_MU  ,WCH_CB  , 0x1d      , 0x1d      },
    00380 #endif // _PC98_
    00381     {VK_RETURN    , 0       ,'\r'      ,'\r'      ,'\r'    ,'\r'    , '\n'      , '\n'      },
    00382     {VK_SPACE     , 0       ,' '       ,' '       ,' '     ,' '     , 0x20      , 0x20      },
    00383     {0            , 0       ,0         ,0         ,0       ,0       , 0         , 0         }
    00384 };
    00385
    00386 static ALLOC_SECTION_LDATA VK_TO_WCHARS8 aVkToWch8[] = {
    00387     //                      |          |   SHIFT  |  KANA  | K+SHFT |  CONTROL  |  K+CTRL   | SHFT+CTRL |K+SHFT+CTRL|
    00388     //                      |          |==========|========|========|===========|===========|===========|===========|
    00389     {'2'          , KANALOK ,'2'       ,'"'       ,WCH_HU  ,WCH_HU  , WCH_NONE  , WCH_NONE  , 0x00      , 0x00      },
    00390     {'6'          , KANALOK ,'6'       ,'&'       ,WCH_O   ,WCH_OO  , WCH_NONE  , WCH_NONE  , 0x1e      , 0x1e      },
    00391     {VK_OEM_MINUS , KANALOK ,'-'       ,'='       ,WCH_HO  ,WCH_HO  , WCH_NONE  , WCH_NONE  , 0x1f      , 0x1f      },
    00392     {0            , 0       ,0         ,0         ,0       ,0       , 0         , 0         , 0         , 0         }
    00393 };
    00394
    00395 // Put this last so that VkKeyScan interprets number characters
    00396 // as coming from the main section of the kbd (aVkToWch2 and
    00397 // aVkToWch4) before considering the numpad (aVkToWch1).
    00398
    00399 static ALLOC_SECTION_LDATA VK_TO_WCHARS4 aVkToWch1[] = {
    00400     //                     |          |   SHIFT  |  KANA  | K+SHFT |
    00401     //                     |          |==========|========|========|
    00402     { VK_NUMPAD0   , 0      ,  '0'    , WCH_NONE ,   '0'  ,WCH_NONE},
    00403     { VK_NUMPAD1   , 0      ,  '1'    , WCH_NONE ,   '1'  ,WCH_NONE},
    00404     { VK_NUMPAD2   , 0      ,  '2'    , WCH_NONE ,   '2'  ,WCH_NONE},
    00405     { VK_NUMPAD3   , 0      ,  '3'    , WCH_NONE ,   '3'  ,WCH_NONE},
    00406     { VK_NUMPAD4   , 0      ,  '4'    , WCH_NONE ,   '4'  ,WCH_NONE},
    00407     { VK_NUMPAD5   , 0      ,  '5'    , WCH_NONE ,   '5'  ,WCH_NONE},
    00408     { VK_NUMPAD6   , 0      ,  '6'    , WCH_NONE ,   '6'  ,WCH_NONE},
    00409     { VK_NUMPAD7   , 0      ,  '7'    , WCH_NONE ,   '7'  ,WCH_NONE},
    00410     { VK_NUMPAD8   , 0      ,  '8'    , WCH_NONE ,   '8'  ,WCH_NONE},
    00411     { VK_NUMPAD9   , 0      ,  '9'    , WCH_NONE ,   '9'  ,WCH_NONE},
    00412     { 0            , 0      ,  '\0'   , 0        ,   0    ,0       }   //null terminator
    00413 };
    00414
    00415 /***************************************************************************\
    00416 * aVkToWcharTable: table of pointers to Character Tables
    00417 *
    00418 * Describes the character tables and the order they should be searched.
    00419 *
    00420 * Note: the order determines the behavior of VkKeyScan() : this function
    00421 *       takes a character and attempts to find a Virtual Key and character-
    00422 *       modifier key combination that produces that character.  The table
    00423 *       containing the numeric keypad (aVkToWch1) must appear last so that
    00424 *       VkKeyScan('0') will be interpreted as one of keys from the main
    00425 *       section, not the numpad.  etc.
    00426 \***************************************************************************/
    00427
    00428 static ALLOC_SECTION_LDATA VK_TO_WCHAR_TABLE aVkToWcharTable[] = {
    00429     {  (PVK_TO_WCHARS1)aVkToWch6, 6, sizeof(aVkToWch6[0]) },
    00430     {  (PVK_TO_WCHARS1)aVkToWch8, 8, sizeof(aVkToWch8[0]) },
    00431     {  (PVK_TO_WCHARS1)aVkToWch4, 4, sizeof(aVkToWch4[0]) },
    00432     {  (PVK_TO_WCHARS1)aVkToWch1, 4, sizeof(aVkToWch1[0]) },  // must come last
    00433     {                       NULL, 0, 0                    }
    00434 };
    00435
    00436 /***************************************************************************\
    00437 * aKeyNames[], aKeyNamesExt[]  - Scan Code -> Key Name tables
    00438 *
    00439 * For the GetKeyNameText() API function
    00440 *
    00441 * Tables for non-extended and extended (KBDEXT) keys.
    00442 * (Keys producing printable characters are named by the character itself)
    00443 \***************************************************************************/
    00444
    00445 static ALLOC_SECTION_LDATA VSC_LPWSTR aKeyNames[] = {
    00446 #if defined(JAPAN) && defined(_PC98_)
    00447     0x01,    L"ESC",            //NEC Esc
    00448     0x0e,    L"BS",             //NEC Backspace
    00449     0x0f,    L"TAB",            //NEC Tab
    00450     0x1c,    L"RETURN",         //NEC Enter
    00451     0x1d,    L"CTRL",           //NEC Ctrl
    00452     0x2a,    L"SHIFT",          //NEC Shift
    00453     0x36,    L"SHIFT",          //NEC Rgiht Shift
    00454 #else //_PC98_
    00455     0x01,    L"Esc",
    00456     0x0e,    L"Backspace",
    00457     0x0f,    L"Tab",
    00458     0x1c,    L"Enter",
    00459     0x1d,    L"Ctrl",
    00460     0x29,    (LPWSTR)SZ_KEY_NAME_HANKAKU_ZENKAKU,  // NLS Key
    00461     0x2a,    L"Shift",
    00462     0x36,    L"Right Shift",
    00463 #endif // _PC98_
    00464     0x37,    L"Num *",
    00465 #if defined(JAPAN) && defined(_PC98_)
    00466     0x38,    L"GRPH",           //NEC Alt
    00467     0x39,    L"SPACE",          //NEC Space
    00468     0x3a,    L"CAPS",           //NEC Caps Lock
    00469     0x3b,    (LPWSTR)SZ_KEY_NAME_F1,    //NEC F1
    00470     0x3c,    (LPWSTR)SZ_KEY_NAME_F2,    //NEC F2
    00471     0x3d,    (LPWSTR)SZ_KEY_NAME_F3,    //NEC F3
    00472     0x3e,    (LPWSTR)SZ_KEY_NAME_F4,    //NEC F4
    00473     0x3f,    (LPWSTR)SZ_KEY_NAME_F5,    //NEC F5
    00474     0x40,    (LPWSTR)SZ_KEY_NAME_F6,    //NEC F6
    00475     0x41,    (LPWSTR)SZ_KEY_NAME_F7,    //NEC F7
    00476     0x42,    (LPWSTR)SZ_KEY_NAME_F8,    //NEC F8
    00477     0x43,    (LPWSTR)SZ_KEY_NAME_F9,    //NEC F9
    00478     0x44,    (LPWSTR)SZ_KEY_NAME_F10,   //NEC F10
    00479 #else //_PC98_
    00480     0x38,    L"Alt",
    00481     0x39,    L"Space",
    00482     0x3a,    L"Caps Lock",
    00483     0x3b,    L"F1",
    00484     0x3c,    L"F2",
    00485     0x3d,    L"F3",
    00486     0x3e,    L"F4",
    00487     0x3f,    L"F5",
    00488     0x40,    L"F6",
    00489     0x41,    L"F7",
    00490     0x42,    L"F8",
    00491     0x43,    L"F9",
    00492     0x44,    L"F10",
    00493 #endif // _PC98_
    00494     0x45,    L"Pause",
    00495     0x46,    L"Scroll Lock",
    00496     0x47,    L"Num 7",
    00497     0x48,    L"Num 8",
    00498     0x49,    L"Num 9",
    00499     0x4a,    L"Num -",
    00500     0x4b,    L"Num 4",
    00501     0x4c,    L"Num 5",
    00502     0x4d,    L"Num 6",
    00503     0x4e,    L"Num +",
    00504     0x4f,    L"Num 1",
    00505     0x50,    L"Num 2",
    00506     0x51,    L"Num 3",
    00507     0x52,    L"Num 0",
    00508 #if defined(JAPAN) && defined(_PC98_)
    00509     0x53,    L"Num .",                    //NEC #931125
    00510 #else //_PC98_
    00511     0x53,    L"Num Del",
    00512 #endif // _PC98_
    00513     0x54,    L"Sys Req",
    00514 #if defined(JAPAN) && defined(_PC98_)
    00515     0x55,    L"",                         //NEC <931125
    00516     0x57,    (LPWSTR)SZ_KEY_NAME_F11,     //NEC
    00517     0x58,    (LPWSTR)SZ_KEY_NAME_F12,     //NEC
    00518     0x59,    L"Num =",                    //NEC
    00519     0x5A,    L"NFER",                     //NEC
    00520     0x5B,    L"Convert",                  //NEC not use
    00521     0x5C,    L"Num ,",                    //NEC
    00522     0x5D,    (LPWSTR)SZ_KEY_NAME_F13,     //NEC
    00523     0x5E,    (LPWSTR)SZ_KEY_NAME_F14,     //NEC
    00524     0x5F,    (LPWSTR)SZ_KEY_NAME_F15,     //NEC
    00525 #else  //  _PC98_
    00526     0x57,    L"F11",
    00527     0x58,    L"F12",
    00528     0x70,    (LPWSTR)SZ_KEY_NAME_HIRAGANA,
    00529     0x79,    (LPWSTR)SZ_KEY_NAME_HENKAN,
    00530     0x7b,    (LPWSTR)SZ_KEY_NAME_MUHENKAN,
    00531     0x7C,    L"F13",
    00532 #endif // _PC98_
    00533     0   ,    NULL
    00534 };
    00535
    00536 static ALLOC_SECTION_LDATA VSC_LPWSTR aKeyNamesExt[] = {
    00537 #if defined(JAPAN) && defined(_PC98_)
    00538     0x1c,    L"Num Enter",
    00539     0x1d,    (LPWSTR)SZ_KEY_NAME_KANA,  //NEC NLS Key Katakana
    00540     0x35,    L"Num /",
    00541     0x37,    L"COPY",                   //NEC Prnt Scr
    00542     0x38,    L"XFER",                   //NEC NLS Key SZ_KEY_NAME_HIRAGANA
    00543     0x45,    L"Num Lock",
    00544     0x46,    L"STOP",                   //NEC Break
    00545     0x47,    L"CLR",                    //NEC Home #931125
    00546     0x48,    L"UP",                     //NEC Up
    00547     0x49,    L"ROLL DOWN",              //NEC Page Up
    00548     0x4b,    L"LEFT",                   //NEC Left
    00549     0x4d,    L"RIGHT",                  //NEC Right
    00550     0x4f,    L"HELP",                   //NEC End  #931125
    00551     0x50,    L"DOWN",                   //NEC Down
    00552     0x51,    L"ROLL UP",                //NEC Page Down
    00553     0x52,    L"INS",                    //NEC Insert
    00554     0x53,    L"DEL",                    //NEC Delete
    00555     0x54,    L"<00>",
    00556     0x56,    L"HELP",                   //NEC Help
    00557 //    0x5C,    L"CLR",                    //NEC Clear
    00558 #else //_PC98_
    00559     0x1c,    L"Num Enter",
    00560     0x1d,    L"Right Control",
    00561     0x35,    L"Num /",
    00562     0x37,    L"Prnt Scrn",
    00563     0x38,    L"Right Alt",
    00564     0x45,    L"Num Lock",
    00565     0x46,    L"Break",
    00566     0x47,    L"Home",
    00567     0x48,    L"Up",
    00568     0x49,    L"Page Up",
    00569     0x4b,    L"Left",
    00570     0x4d,    L"Right",
    00571     0x4f,    L"End",
    00572     0x50,    L"Down",
    00573     0x51,    L"Page Down",
    00574     0x52,    L"Insert",
    00575     0x53,    L"Delete",
    00576 #endif // _PC98_
    00577     0x5B,    L"Left Windows",
    00578     0x5C,    L"Right Windows",
    00579     0x5D,    L"Application",
    00580     0   ,    NULL
    00581 };
    00582
    00583 static ALLOC_SECTION_LDATA KBDTABLES KbdTables = {
    00584     /*
    00585      * Modifier keys
    00586      */
    00587     &CharModifiers,
    00588
    00589     /*
    00590      * Characters tables
    00591      */
    00592     aVkToWcharTable,
    00593
    00594     /*
    00595      * Diacritics  (none for US English)
    00596      */
    00597     NULL,
    00598
    00599     /*
    00600      * Names of Keys  (no dead keys)
    00601      */
    00602     aKeyNames,
    00603     aKeyNamesExt,
    00604     NULL,
    00605
    00606     /*
    00607      * Scan codes to Virtual Keys
    00608      */
    00609     ausVK,
    00610     sizeof(ausVK) / sizeof(ausVK[0]),
    00611     aE0VscToVk,
    00612     aE1VscToVk,
    00613
    00614     /*
    00615      * No Locale-specific special processing
    00616      */
    00617     0
    00618 };
    00619
    00620 PKBDTABLES KbdLayerDescriptor(VOID)
    00621 {
    00622     return &KbdTables;
    00623 }
    00624
    00625 /***********************************************************************\
    00626 * VkToFuncTable_106[]
    00627 *
    00628 \***********************************************************************/
    00629
    00630 static ALLOC_SECTION_LDATA VK_F VkToFuncTable_106[] = {
    00631     {
    00632         VK_DBE_ALPHANUMERIC,  // Base Vk
    00633         KBDNLS_TYPE_TOGGLE,   // NLSFEProcType
    00634         KBDNLS_INDEX_NORMAL,  // NLSFEProcCurrent
    00635         0x02, /* 00000010 */  // NLSFEProcSwitch
    00636         {                     // NLSFEProc
    00637             {KBDNLS_ALPHANUM,0},               // Base
    00638             {KBDNLS_SEND_PARAM_VK,VK_CAPITAL}, // Shift
    00639             {KBDNLS_ALPHANUM,0},               // Control
    00640             {KBDNLS_ALPHANUM,0},               // Shift+Control
    00641             {KBDNLS_ALPHANUM,0},               // Alt
    00642             {KBDNLS_ALPHANUM,0},               // Shift+Alt
    00643             {KBDNLS_CODEINPUT,0},              // Control+Alt
    00644             {KBDNLS_CODEINPUT,0}               // Shift+Control+Alt
    00645         },
    00646         {                     // NLSFEProcAlt
    00647             {KBDNLS_SEND_PARAM_VK,VK_CAPITAL}, // Base
    00648             {KBDNLS_SEND_PARAM_VK,VK_CAPITAL}, // Shift
    00649             {KBDNLS_NOEVENT,0},                // Control
    00650             {KBDNLS_NOEVENT,0},                // Shift+Control
    00651             {KBDNLS_NOEVENT,0},                // Alt
    00652             {KBDNLS_NOEVENT,0},                // Shift+Alt
    00653             {KBDNLS_NOEVENT,0},                // Control+Alt
    00654             {KBDNLS_NOEVENT,0}                 // Shift+Control+Alt
    00655         }
    00656     },
    00657     {
    00658         VK_DBE_HIRAGANA,     // Base Vk
    00659         KBDNLS_TYPE_TOGGLE,  // NLSFEProcType
    00660         KBDNLS_INDEX_NORMAL, // NLSFEProcCurrent
    00661         0x08, /* 00001000 */ // NLSFEProcSwitch
    00662         {                    // NLSFEProc
    00663             {KBDNLS_HIRAGANA,0},             // Base
    00664             {KBDNLS_KATAKANA,0},             // Shift
    00665             {KBDNLS_HIRAGANA,0},             // Control
    00666             {KBDNLS_SEND_PARAM_VK,VK_KANA},  // Shift+Control
    00667             {KBDNLS_ROMAN,0},                // Alt
    00668             {KBDNLS_ROMAN,0},                // Shift+Alt
    00669             {KBDNLS_ROMAN,0},                // Control+Alt
    00670             {KBDNLS_NOEVENT,0}               // Shift+Control+Alt
    00671         },
    00672         {                    // NLSFEProcIndexAlt
    00673             {KBDNLS_SEND_PARAM_VK,VK_KANA},  // Base
    00674             {KBDNLS_SEND_PARAM_VK,VK_KANA},  // Shift
    00675             {KBDNLS_SEND_PARAM_VK,VK_KANA},  // Control
    00676             {KBDNLS_SEND_PARAM_VK,VK_KANA},  // Shift+Control
    00677             {KBDNLS_NOEVENT,0},              // Alt
    00678             {KBDNLS_NOEVENT,0},              // Shift+Alt
    00679             {KBDNLS_NOEVENT,0},              // Control+Alt
    00680             {KBDNLS_NOEVENT,0}               // Shift+Control+Alt
    00681         }
    00682     },
    00683     {
    00684         VK_DBE_SBCSCHAR,     // Base Vk
    00685         KBDNLS_TYPE_NORMAL,  // NLSFEProcType
    00686         KBDNLS_INDEX_NORMAL, // NLSFEProcCurrent
    00687         0x0,                 // NLSFEProcSwitch
    00688         {                    // NLSFEProc
    00689             {KBDNLS_SBCSDBCS,0},             // Base
    00690             {KBDNLS_SBCSDBCS,0},             // Shift
    00691             {KBDNLS_SBCSDBCS,0},             // Control
    00692             {KBDNLS_SBCSDBCS,0},             // Shift+Control
    00693             {KBDNLS_SEND_PARAM_VK,VK_KANJI}, // Alt
    00694             {KBDNLS_SBCSDBCS,0},             // Shift+Alt
    00695             {KBDNLS_SEND_PARAM_VK,VK_DBE_ENTERIMECONFIGMODE}, // Control+Alt
    00696             {KBDNLS_SEND_PARAM_VK,VK_DBE_ENTERIMECONFIGMODE}  // Shift+Control+Alt
    00697         },
    00698         {                    // NLSFEProcIndexAlt
    00699             {KBDNLS_NULL,0},  // Base
    00700             {KBDNLS_NULL,0},  // Shift
    00701             {KBDNLS_NULL,0},  // Control
    00702             {KBDNLS_NULL,0},  // Shift+Control
    00703             {KBDNLS_NULL,0},  // Alt
    00704             {KBDNLS_NULL,0},  // Shift+Alt
    00705             {KBDNLS_NULL,0},  // Control+Alt
    00706             {KBDNLS_NULL,0}   // Shift+Control+Alt
    00707         }
    00708     },
    00709     {
    00710         VK_NONCONVERT,       // Base Vk
    00711         KBDNLS_TYPE_NORMAL,  // NLSFEProcType
    00712         KBDNLS_INDEX_NORMAL, // NLSFEProcCurrent
    00713         0x0,                 // NLSFEProcSwitch
    00714         {                    // NLSFEProc
    00715             {KBDNLS_SEND_BASE_VK,0},         // Base
    00716             {KBDNLS_SEND_BASE_VK,0},         // Shift
    00717             {KBDNLS_SEND_BASE_VK,0},         // Control
    00718             {KBDNLS_SEND_BASE_VK,0},         // Shift+Control
    00719             {KBDNLS_SEND_BASE_VK,0},         // Alt
    00720             {KBDNLS_SEND_BASE_VK,0},         // Shift+Alt
    00721             {KBDNLS_SEND_PARAM_VK,VK_DBE_ENTERWORDREGISTERMODE}, // Control+Alt
    00722             {KBDNLS_SEND_PARAM_VK,VK_DBE_ENTERWORDREGISTERMODE}  // Shift+Control+Alt
    00723         },
    00724         {                         // NLSFEProcIndexAlt
    00725             {KBDNLS_NULL,0},  // Base
    00726             {KBDNLS_NULL,0},  // Shift
    00727             {KBDNLS_NULL,0},  // Control
    00728             {KBDNLS_NULL,0},  // Shift+Control
    00729             {KBDNLS_NULL,0},  // Alt
    00730             {KBDNLS_NULL,0},  // Shift+Alt
    00731             {KBDNLS_NULL,0},  // Control+Alt
    00732             {KBDNLS_NULL,0}   // Shift+Control+Alt
    00733         }
    00734     }
    00735 };
    00736
    00737 #if defined(JAPAN) && defined(_PC98_)
    00738 static ALLOC_SECTION_LDATA VK_F VkToFuncTable_NEC[] = {
    00739     {
    00740         VK_NONCONVERT,       // Base Vk  PC98_NFER key
    00741         KBDNLS_TYPE_NORMAL,  // NLSFEProcType
    00742         KBDNLS_INDEX_NORMAL, // NLSFEProcCurrent
    00743         0x0,                 // NLSFEProcSwitch
    00744         {                    // NLSFEProc
    00745             {KBDNLS_SEND_BASE_VK,0},                             // Base
    00746             {KBDNLS_SEND_BASE_VK,0},                             // Shift
    00747             {KBDNLS_SEND_PARAM_VK,VK_DBE_ALPHANUMERIC},          // Control
    00748             {KBDNLS_SBCSDBCS,0},                                 // Shift+Control
    00749             {KBDNLS_SEND_PARAM_VK,VK_DBE_KATAKANA},              // Alt
    00750             {KBDNLS_SEND_PARAM_VK,VK_DBE_ENTERWORDREGISTERMODE}, // Shift+Alt
    00751             {KBDNLS_SEND_PARAM_VK,VK_DBE_NOCODEINPUT},           // Control+Alt
    00752             {KBDNLS_SEND_PARAM_VK,VK_DBE_FLUSHSTRING}            // Shift+Control+Alt
    00753         },
    00754         {                     // NLSFEProcIndexAlt
    00755             {KBDNLS_NULL,0},  // Base
    00756             {KBDNLS_NULL,0},  // Shift
    00757             {KBDNLS_NULL,0},  // Control
    00758             {KBDNLS_NULL,0},  // Shift+Control
    00759             {KBDNLS_NULL,0},  // Alt
    00760             {KBDNLS_NULL,0},  // Shift+Alt
    00761             {KBDNLS_NULL,0},  // Control+Alt
    00762             {KBDNLS_NULL,0}   // Shift+Control+Alt
    00763         }
    00764     },
    00765     {
    00766         VK_KANJI,            // Base Vk  PC98_XFER key
    00767         KBDNLS_TYPE_NORMAL,  // NLSFEProcType
    00768         KBDNLS_INDEX_NORMAL, // NLSFEProcCurrent
    00769         0x0,                 // NLSFEProcSwitch
    00770         {                    // NLSFEProc
    00771             {KBDNLS_SEND_PARAM_VK,VK_CONVERT},                // Base
    00772             {KBDNLS_SEND_PARAM_VK,VK_CONVERT},                // Shift
    00773             {KBDNLS_SEND_BASE_VK,0},                          // Control
    00774             {KBDNLS_SEND_PARAM_VK,VK_CONVERT},                // Shift+Control
    00775             {KBDNLS_ROMAN,0},                                 // Alt
    00776             {KBDNLS_SEND_PARAM_VK,VK_DBE_ENTERIMECONFIGMODE}, // Shift+Alt
    00777             {KBDNLS_SEND_PARAM_VK,VK_DBE_CODEINPUT},          // Control+Alt
    00778             {KBDNLS_SEND_PARAM_VK,VK_DBE_HIRAGANA}            // Shift+Control+Alt
    00779         },
    00780         {                     // NLSFEProcIndexAlt
    00781             {KBDNLS_NULL,0},  // Base
    00782             {KBDNLS_NULL,0},  // Shift
    00783             {KBDNLS_NULL,0},  // Control
    00784             {KBDNLS_NULL,0},  // Shift+Control
    00785             {KBDNLS_NULL,0},  // Alt
    00786             {KBDNLS_NULL,0},  // Shift+Alt
    00787             {KBDNLS_NULL,0},  // Control+Alt
    00788             {KBDNLS_NULL,0}   // Shift+Control+Alt
    00789         }
    00790     },
    00791     {
    00792         VK_OEM_NEC_EQUAL,    // Base Vk  PC98_"="  key
    00793         KBDNLS_TYPE_NORMAL,  // NLSFEProcType
    00794         KBDNLS_INDEX_NORMAL, // NLSFEProcCurrent
    00795         0x0,                 // NLSFEProcSwitch
    00796         {                    // NLSFEProc
    00797             {KBDNLS_SEND_BASE_VK,0},                  // Base
    00798             {KBDNLS_SEND_BASE_VK,0},                  // Shift
    00799             {KBDNLS_SEND_PARAM_VK,VK_SCROLL},         // Control
    00800             {KBDNLS_SEND_BASE_VK,0},                  // Shift+Control
    00801             {KBDNLS_SEND_BASE_VK,0},                  // Alt
    00802             {KBDNLS_SEND_BASE_VK,0},                  // Shift+Alt
    00803             {KBDNLS_SEND_BASE_VK,0},                  // Control+Alt
    00804             {KBDNLS_SEND_BASE_VK,0}                   // Shift+Control+Alt
    00805         },
    00806         {                     // NLSFEProcIndexAlt
    00807             {KBDNLS_NULL,0},  // Base
    00808             {KBDNLS_NULL,0},  // Shift
    00809             {KBDNLS_NULL,0},  // Control
    00810             {KBDNLS_NULL,0},  // Shift+Control
    00811             {KBDNLS_NULL,0},  // Alt
    00812             {KBDNLS_NULL,0},  // Shift+Alt
    00813             {KBDNLS_NULL,0},  // Control+Alt
    00814             {KBDNLS_NULL,0}   // Shift+Control+Alt
    00815         }
    00816     },
    00817     {
    00818         VK_HOME,             // Base Vk  PC98_HOME  key
    00819         KBDNLS_TYPE_NORMAL,  // NLSFEProcType
    00820         KBDNLS_INDEX_NORMAL, // NLSFEProcCurrent
    00821         0x0,                 // NLSFEProcSwitch
    00822         {                    // NLSFEProc
    00823             {KBDNLS_HOME_OR_CLEAR,0},         // Base
    00824             {KBDNLS_SEND_BASE_VK,0},          // Shift
    00825             {KBDNLS_HOME_OR_CLEAR,0},         // Control
    00826             {KBDNLS_HOME_OR_CLEAR,0},         // Shift+Control
    00827             {KBDNLS_HOME_OR_CLEAR,0},         // Alt
    00828             {KBDNLS_HOME_OR_CLEAR,0},         // Shift+Alt
    00829             {KBDNLS_HOME_OR_CLEAR,0},         // Control+Alt
    00830             {KBDNLS_HOME_OR_CLEAR,0}          // Shift+Control+Alt
    00831         },
    00832         {                     // NLSFEProcIndexAlt
    00833             {KBDNLS_NULL,0},  // Base
    00834             {KBDNLS_NULL,0},  // Shift
    00835             {KBDNLS_NULL,0},  // Control
    00836             {KBDNLS_NULL,0},  // Shift+Control
    00837             {KBDNLS_NULL,0},  // Alt
    00838             {KBDNLS_NULL,0},  // Shift+Alt
    00839             {KBDNLS_NULL,0},  // Control+Alt
    00840             {KBDNLS_NULL,0}   // Shift+Control+Alt
    00841         }
    00842     },
    00843     {
    00844         VK_END,              // Base Vk  PC98_HELP  key
    00845         KBDNLS_TYPE_NORMAL,  // NLSFEProcType
    00846         KBDNLS_INDEX_NORMAL, // NLSFEProcCurrent
    00847         0x0,                 // NLSFEProcSwitch
    00848         {                    // NLSFEProc
    00849             {KBDNLS_HELP_OR_END,0},         // Base
    00850             {KBDNLS_HELP_OR_END,0},         // Shift
    00851             {KBDNLS_HELP_OR_END,0},         // Control
    00852             {KBDNLS_HELP_OR_END,0},         // Shift+Control
    00853             {KBDNLS_HELP_OR_END,0},         // Alt
    00854             {KBDNLS_HELP_OR_END,0},         // Shift+Alt
    00855             {KBDNLS_HELP_OR_END,0},         // Control+Alt
    00856             {KBDNLS_HELP_OR_END,0}          // Shift+Control+Alt
    00857         },
    00858         {                     // NLSFEProcIndexAlt
    00859             {KBDNLS_NULL,0},  // Base
    00860             {KBDNLS_NULL,0},  // Shift
    00861             {KBDNLS_NULL,0},  // Control
    00862             {KBDNLS_NULL,0},  // Shift+Control
    00863             {KBDNLS_NULL,0},  // Alt
    00864             {KBDNLS_NULL,0},  // Shift+Alt
    00865             {KBDNLS_NULL,0},  // Control+Alt
    00866             {KBDNLS_NULL,0}   // Shift+Control+Alt
    00867         }
    00868     }
    00869 };
    00870
    00871 USHORT ausMouseVKey98[] = {
    00872                        VK_NUMPAD5,
    00873                        VK_NUMPAD9,
    00874                        VK_NUMPAD3,
    00875                        VK_NUMPAD1,
    00876                        VK_NUMPAD7,
    00877                        VK_NUMPAD4,
    00878                        VK_NUMPAD8,
    00879                        VK_NUMPAD6,
    00880                        VK_NUMPAD2,
    00881                        VK_NUMPAD0,
    00882                        VK_DECIMAL,
    00883                        VK_MULTIPLY,
    00884                        VK_ADD,
    00885                        VK_SUBTRACT,
    00886                        VK_DIVIDE | KBDEXT,
    00887                        VK_HOME | KBDEXT
    00888                       };
    00889
    00890 #else //_PC98_
    00891 #endif // _PC98_
    00892 /***********************************************************************\
    00893 * KbdNlsTables
    00894 *
    00895 \***********************************************************************/
    00896
    00897 static ALLOC_SECTION_LDATA KBDNLSTABLES KbdNlsTables = {
    00898 #if defined(JAPAN) && defined(_PC98_)
    00899     0x0d,                            // OEM ID (0x0d = NEC)
    00900     NLSKBD_INFO_ACCESSIBILITY_KEYMAP,// Information
    00901     5,                               // Number of VK_F entry
    00902     VkToFuncTable_NEC,               // Pointer to VK_F array
    00903     16,                              // Number of MouseVk entry
    00904     ausMouseVKey98                   // Pointer to MouseVk array
    00905 #else //_PC98_
    00906     0,                      // OEM ID (0 = Microsoft)
    00907     0,                      // Information
    00908     4,                      // Number of VK_F entry
    00909     VkToFuncTable_106,      // Pointer to VK_F array
    00910     0,                      // Number of MouseVk entry
    00911     NULL                    // Pointer to MouseVk array
    00912 #endif // _PC98_
    00913 };
    00914
    00915 PKBDNLSTABLES KbdNlsLayerDescriptor(VOID)
    00916 {
    00917     return &KbdNlsTables;
    00918 }