[New for Windows NT 4.0 Service Pack 3.]
The KBDLLHOOKSTRUCT structure contains information about a low-level keyboard input event.
typedef struct tagKBDLLHOOKSTRUCT { DWORD vkCode; // virtual key code DWORD scanCode; // scan code DWORD flags; // flags DWORD time; // time stamp for this message DWORD dwExtraInfo; // extra info from the driver or keybd_event } KBDLLHOOKSTRUCT, FAR *LPKBDLLHOOKSTRUCT, *PKBDLLHOOKSTRUCT;
Value |
Description |
0 |
Specifies whether the key is an extended key, such as a function key or a key on the numeric keypad. The value is 1 if the key is an extended key; otherwise, it is 0. |
1-3 |
Reserved. |
4 |
Specifies whether the event was injected. The value is 1 if the event was injected; otherwise, it is 0. |
5 |
Specifies the context code. The value is 1 if the ALT key is pressed; otherwise, it is 0. |
6 |
Reserved. |
7 |
Specifies the transition state. The value is 0 if the key is pressed and 1 if it is being released. |
An application can use the following values to test the keystroke flags:
Value |
Purpose |
LLKHF_EXTENDED |
Test the extended-key flag. |
LLKHF_INJECTED |
Test the event-injected flag. |
LLKHF_ALTDOWN |
Test the context code. |
LLKHF_UP |
Test the transition-state flag. |
LowLevelKeyboardProc, SetWindowsHookEx
Questions: