ReactOS 0.4.16-dev-237-gd6eebaa
kbd.h
Go to the documentation of this file.
1#define __KBD_H
2
3#ifdef __cplusplus
4extern "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 {
61
63
64#define DKF_DEAD 1
65
66 typedef struct _VSC_LPWSTR {
70
71 typedef struct _VSC_VK {
75
76#define TYPEDEF_LIGATURE(i) \
77typedef 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;
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
unsigned long DWORD
Definition: ntddk_ex.h:95
unsigned short WORD
Definition: ntddk_ex.h:93
struct _VSC_LPWSTR * PVSC_LPWSTR
struct _VK_TO_WCHAR_TABLE VK_TO_WCHAR_TABLE
struct _VK_TO_BIT VK_TO_BIT
struct _KBDTABLES * PKBDTABLES
struct _DEADKEY * PDEADKEY
struct _KBDTABLES KBDTABLES
struct _MODIFIERS * PMODIFIERS
struct _VK_TO_BIT * PVK_TO_BIT
struct _VSC_VK * PVSC_VK
struct _DEADKEY DEADKEY
struct _VK_TO_WCHAR_TABLE * PVK_TO_WCHAR_TABLE
struct _VSC_VK VSC_VK
struct _VSC_LPWSTR VSC_LPWSTR
#define TYPEDEF_VK_TO_WCHARS(i)
Definition: kbd.h:32
struct _MODIFIERS MODIFIERS
WCHAR * DEADKEY_LPWSTR
Definition: kbd.h:62
#define TYPEDEF_LIGATURE(i)
Definition: kbd.h:76
unsigned short USHORT
Definition: pedump.c:61
Definition: kbd.h:56
WCHAR wchComposed
Definition: kbd.h:58
DWORD dwBoth
Definition: kbd.h:57
USHORT uFlags
Definition: kbd.h:59
Definition: kbd.h:95
VSC_LPWSTR * pKeyNamesExt
Definition: kbd.h:100
PMODIFIERS pCharModifiers
Definition: kbd.h:96
PLIGATURE1 pLigature
Definition: kbd.h:109
BYTE bMaxVSCtoVK
Definition: kbd.h:103
BYTE nLgMaxd
Definition: kbd.h:107
PVK_TO_WCHAR_TABLE pVkToWcharTable
Definition: kbd.h:97
USHORT * pusVSCtoVK
Definition: kbd.h:102
DWORD fLocaleFlags
Definition: kbd.h:106
PVSC_VK pVSCtoVK_E0
Definition: kbd.h:104
PDEADKEY pDeadKey
Definition: kbd.h:98
LPWSTR * pKeyNamesDead
Definition: kbd.h:101
BYTE cbLgEntry
Definition: kbd.h:108
VSC_LPWSTR * pKeyNames
Definition: kbd.h:99
PVSC_VK pVSCtoVK_E1
Definition: kbd.h:105
Definition: kbd.h:26
WORD wMaxModBits
Definition: kbd.h:28
BYTE ModNumber[]
Definition: kbd.h:29
PVK_TO_BIT pVkToBit
Definition: kbd.h:27
Definition: kbd.h:21
BYTE ModBits
Definition: kbd.h:23
BYTE Vk
Definition: kbd.h:22
BYTE cbSize
Definition: kbd.h:53
PVK_TO_WCHARS1 pVkToWchars
Definition: kbd.h:51
BYTE nModifications
Definition: kbd.h:52
LPWSTR pwsz
Definition: kbd.h:68
BYTE vsc
Definition: kbd.h:67
Definition: kbd.h:71
USHORT Vk
Definition: kbd.h:73
BYTE Vsc
Definition: kbd.h:72
__wchar_t WCHAR
Definition: xmlstorage.h:180
WCHAR * LPWSTR
Definition: xmlstorage.h:184
unsigned char BYTE
Definition: xxhash.c:193