RAWKEYBOARD structure (winuser.h)

Contains information about the state of the keyboard.

Syntax

typedef struct tagRAWKEYBOARD {
  USHORT MakeCode;
  USHORT Flags;
  USHORT Reserved;
  USHORT VKey;
  UINT   Message;
  ULONG  ExtraInformation;
} RAWKEYBOARD, *PRAWKEYBOARD, *LPRAWKEYBOARD;

Members

MakeCode

Type: USHORT

Specifies the scan code associated with a key press. See Remarks.

Flags

Type: USHORT

Flags for scan code information. It can be one or more of the following:

Value Meaning
RI_KEY_MAKE 0 The key is down.
RI_KEY_BREAK 1 The key is up.
RI_KEY_E0 2 The scan code has the E0 prefix.
RI_KEY_E1 4 The scan code has the E1 prefix.

Reserved

Type: USHORT

Reserved; must be zero.

VKey

Type: USHORT

The corresponding legacy virtual-key code.

Message

Type: UINT

The corresponding legacy keyboard window message, for example WM_KEYDOWN, WM_SYSKEYDOWN, and so forth.

ExtraInformation

Type: ULONG

The device-specific additional information for the event.

Remarks

A list of MakeCode values is provided in the Keyboard Input Overview (see Scan 1 make column).

For a HID keyboard, MakeCode values are generated by a HID client mapper driver that converts HID usages into scan codes according to USB HID to PS/2 Scan Code Translation Table (see PS/2 Set 1 Make column).

KEYBOARD_OVERRUN_MAKE_CODE is a special MakeCode value sent when an invalid or unrecognizable combination of keys is pressed or the number of keys pressed exceeds the limit for this keyboard.

Requirements

Requirement Value
Minimum supported client Windows XP [desktop apps only]
Minimum supported server Windows Server 2003 [desktop apps only]
Header winuser.h (include Windows.h)

See also