ReactOS  0.4.14-dev-317-g96040ec
kbd.h
Go to the documentation of this file.
1 #define __KBD_H
2 
3 #ifdef __cplusplus
4 extern "C" {
5 #endif
6 
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 */
12 
13 /* Modifier bits */
14 #define KBDSHIFT 0x001 /* Shift modifier */
15 #define KBDCTRL 0x002 /* Ctrl modifier */
16 #define KBDALT 0x004 /* Alt modifier */
17 
18 /* Invalid shift */
19 #define SHFT_INVALID 0x0F
20 
21  typedef struct _VK_TO_BIT {
25 
26  typedef struct _MODIFIERS {
31 
32 #define TYPEDEF_VK_TO_WCHARS(i) \
33  typedef struct _VK_TO_WCHARS ## i { \
34  BYTE VirtualKey; \
35  BYTE Attributes; \
36  WCHAR wch[i]; \
37  } VK_TO_WCHARS ## i, *PVK_TO_WCHARS ## i;
38 
49 
51  PVK_TO_WCHARS1 pVkToWchars;
55 
56  typedef struct _DEADKEY {
60  } DEADKEY, *PDEADKEY;
61 
63 
64 #define DKF_DEAD 1
65 
66  typedef struct _VSC_LPWSTR {
70 
71  typedef struct _VSC_VK {
74  } VSC_VK, *PVSC_VK;
75 
76 #define TYPEDEF_LIGATURE(i) \
77 typedef struct _LIGATURE ## i { \
78  BYTE VirtualKey; \
79  WORD ModificationNumber; \
80  WCHAR wch[i]; \
81 } LIGATURE ## i, *PLIGATURE ## i;
82 
88 
89 #define KBD_VERSION 1
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
94 
95  typedef struct _KBDTABLES {
109  PLIGATURE1 pLigature;
110  } KBDTABLES, *PKBDTABLES;
111 
112 /* Constants that help table decoding */
113 #define WCH_NONE 0xf000
114 #define WCH_DEAD 0xf001
115 #define WCH_LGTR 0xf002
116 
117 /* VK_TO_WCHARS attributes */
118 #define CAPLOK 0x01
119 #define SGCAPS 0x02
120 #define CAPLOKALTGR 0x04
121 #define KANALOK 0x08
122 #define GRPSELTAP 0x80
123 
124 #define VK_ABNT_C1 0xC1
125 #define VK_ABNT_C2 0xC2
126 
127 /* Useful scancodes */
128 #define SCANCODE_LSHIFT 0x2A
129 #define SCANCODE_RSHIFT 0x36
130 #define SCANCODE_CTRL 0x1D
131 #define SCANCODE_ALT 0x38
132 
133 #ifdef __cplusplus
134 };
135 #endif//__KBD_H
BYTE cbLgEntry
Definition: kbd.h:108
WCHAR wchComposed
Definition: kbd.h:58
USHORT uFlags
Definition: kbd.h:59
PVK_TO_WCHARS1 pVkToWchars
Definition: kbd.h:51
struct _VSC_LPWSTR * PVSC_LPWSTR
WCHAR * DEADKEY_LPWSTR
Definition: kbd.h:62
VSC_LPWSTR * pKeyNamesExt
Definition: kbd.h:100
BYTE ModBits
Definition: kbd.h:23
BYTE nLgMaxd
Definition: kbd.h:107
struct _KBDTABLES KBDTABLES
struct _MODIFIERS * PMODIFIERS
struct _DEADKEY DEADKEY
Definition: kbd.h:21
BYTE Vsc
Definition: kbd.h:72
Definition: kbd.h:26
struct _MODIFIERS MODIFIERS
PVSC_VK pVSCtoVK_E0
Definition: kbd.h:104
DWORD fLocaleFlags
Definition: kbd.h:106
struct _VSC_LPWSTR VSC_LPWSTR
struct _VSC_VK * PVSC_VK
USHORT Vk
Definition: kbd.h:73
#define TYPEDEF_VK_TO_WCHARS(i)
Definition: kbd.h:32
struct _KBDTABLES * PKBDTABLES
PDEADKEY pDeadKey
Definition: kbd.h:98
struct _VSC_VK VSC_VK
BYTE nModifications
Definition: kbd.h:52
PVK_TO_WCHAR_TABLE pVkToWcharTable
Definition: kbd.h:97
LPWSTR pwsz
Definition: kbd.h:68
struct _VK_TO_WCHAR_TABLE * PVK_TO_WCHAR_TABLE
VSC_LPWSTR * pKeyNames
Definition: kbd.h:99
BYTE ModNumber[]
Definition: kbd.h:29
__wchar_t WCHAR
Definition: xmlstorage.h:180
PLIGATURE1 pLigature
Definition: kbd.h:109
WORD wMaxModBits
Definition: kbd.h:28
Definition: kbd.h:95
unsigned short WORD
Definition: ntddk_ex.h:93
unsigned long DWORD
Definition: ntddk_ex.h:95
struct _VK_TO_BIT * PVK_TO_BIT
PVK_TO_BIT pVkToBit
Definition: kbd.h:27
BYTE cbSize
Definition: kbd.h:53
struct _VK_TO_BIT VK_TO_BIT
BYTE Vk
Definition: kbd.h:22
USHORT * pusVSCtoVK
Definition: kbd.h:102
unsigned char BYTE
Definition: mem.h:68
struct _DEADKEY * PDEADKEY
Definition: kbd.h:71
BYTE vsc
Definition: kbd.h:67
struct _VK_TO_WCHAR_TABLE VK_TO_WCHAR_TABLE
DWORD dwBoth
Definition: kbd.h:57
unsigned short USHORT
Definition: pedump.c:61
PMODIFIERS pCharModifiers
Definition: kbd.h:96
LPWSTR * pKeyNamesDead
Definition: kbd.h:101
Definition: kbd.h:56
BYTE bMaxVSCtoVK
Definition: kbd.h:103
WCHAR * LPWSTR
Definition: xmlstorage.h:184
PVSC_VK pVSCtoVK_E1
Definition: kbd.h:105
#define TYPEDEF_LIGATURE(i)
Definition: kbd.h:76