Using D5.01. From Windows.pas:
{$EXTERNALSYM _KEY_EVENT_RECORD}
_KEY_EVENT_RECORD = packed record
bKeyDown: BOOL;
wRepeatCount: Word;
wVirtualKeyCode: Word;
wVirtualScanCode: Word;
case Integer of
0: (
UnicodeChar: WCHAR;
dwControlKeyState: DWORD);
1: (
AsciiChar: CHAR);
end;
This appears to me to indicate that the dwControlKeyState and AsciiChar
fields are mutually exclusive. However in MSDN I find the following
which seems to imply that dwControlKeyState is always defined.
typedef struct _KEY_EVENT_RECORD
{ BOOL bKeyDown; WORD wRepeatCount;
WORD wVirtualKeyCode;
WORD wVirtualScanCode;
union {
WCHAR UnicodeChar;
CHAR AsciiChar;
} uChar;
DWORD dwControlKeyState;
} KEY_EVENT_RECORD;
Can someone help clarify my understanding? TIA, Rich