7 /* Virtual key flags */
8 #define KBDEXT 0x100 /* Extended key code */
9 #define KBDMULTIVK 0x200 /* Multi-key */
10 #define KBDSPECIAL 0x400 /* Special key */
11 #define KBDNUMPAD 0x800 /* Number-pad */
14 #define KBDSHIFT 0x001 /* Shift modifier */
15 #define KBDCTRL 0x002 /* Ctrl modifier */
16 #define KBDALT 0x004 /* Alt modifier */
19 #define SHFT_INVALID 0x0F
21 typedef struct _VK_TO_BIT
{
24 } VK_TO_BIT
, *PVK_TO_BIT
;
26 typedef struct _MODIFIERS
{
30 } MODIFIERS
, *PMODIFIERS
;
32 #define TYPEDEF_VK_TO_WCHARS(i) \
33 typedef struct _VK_TO_WCHARS ## i { \
37 } VK_TO_WCHARS ## i, *PVK_TO_WCHARS ## i;
39 TYPEDEF_VK_TO_WCHARS(1)
40 TYPEDEF_VK_TO_WCHARS(2)
41 TYPEDEF_VK_TO_WCHARS(3)
42 TYPEDEF_VK_TO_WCHARS(4)
43 TYPEDEF_VK_TO_WCHARS(5)
44 TYPEDEF_VK_TO_WCHARS(6)
45 TYPEDEF_VK_TO_WCHARS(7)
46 TYPEDEF_VK_TO_WCHARS(8)
47 TYPEDEF_VK_TO_WCHARS(9)
48 TYPEDEF_VK_TO_WCHARS(10)
50 typedef struct _VK_TO_WCHAR_TABLE
{
51 PVK_TO_WCHARS1 pVkToWchars
;
54 } VK_TO_WCHAR_TABLE
, *PVK_TO_WCHAR_TABLE
;
56 typedef struct _DEADKEY
{
62 typedef WCHAR
*DEADKEY_LPWSTR
;
66 typedef struct _VSC_LPWSTR
{
69 } VSC_LPWSTR
, *PVSC_LPWSTR
;
71 typedef struct _VSC_VK
{
76 #define TYPEDEF_LIGATURE(i) \
77 typedef struct _LIGATURE ## i { \
79 WORD ModificationNumber; \
81 } LIGATURE ## i, *PLIGATURE ## i;
90 #define GET_KBD_VERSION(p) (HIWORD((p)->fLocalFlags))
91 #define KLLF_ALTGR 0x1
92 #define KLLF_SHIFTLOCK 0x2
93 #define KLLF_LRM_RLM 0x4
95 typedef struct _KBDTABLES
{
96 PMODIFIERS pCharModifiers
;
97 PVK_TO_WCHAR_TABLE pVkToWcharTable
;
99 VSC_LPWSTR
*pKeyNames
;
100 VSC_LPWSTR
*pKeyNamesExt
;
101 LPWSTR
*pKeyNamesDead
;
109 PLIGATURE1 pLigature
;
110 } KBDTABLES
, *PKBDTABLES
;
112 /* Constants that help table decoding */
113 #define WCH_NONE 0xf000
114 #define WCH_DEAD 0xf001
115 #define WCH_LGTR 0xf002
117 /* VK_TO_WCHARS attributes */
120 #define CAPLOKALTGR 0x04
122 #define GRPSELTAP 0x80
124 #define VK_ABNT_C1 0xC1
125 #define VK_ABNT_C2 0xC2
127 /* Useful scancodes */
128 #define SCANCODE_LSHIFT 0x2A
129 #define SCANCODE_RSHIFT 0x36
130 #define SCANCODE_CTRL 0x1D
131 #define SCANCODE_ALT 0x38