KEYBDINPUT

[This is preliminary documentation and subject to change.]

Contains information about a simulated keyboard event.

typedef struct tagKEYBDINPUT {
    WORD    wVk;
    WORD    wScan;
    DWORD   dwFlags;
    DWORD   time;
    DWORD   dwExtraInfo;
} KEYBDINPUT, *PKEYBDINPUT, FAR* LPKEYBDINPUT;
 

Members

wVk
Value specifying the virtual key code. This value must be between 1 and 254, inclusive. The winuser.h header file provides macro definitions (VK_*) for each value.
wScan
Value specifying the hardware scan code for the key.
dwFlags
Bitmask value containing bit flags that specify various aspects of a keystroke. These bits can be any combination of the following values.
KEYEVENTF_EXTENDEDKEY If specified, the scan code was preceded by a prefix byte that has the value 0xE0 (224).
KEYEVENTF_KEYUP If specified, the key is being released. If not specified, the key is being pressed.

time
Value indicating the time stamp for the event, in milliseconds.
dwExtraInfo
A 32-bit value to be associated with the keystroke. An application calls the Win32 GetMessageExtraInfo function to obtain this extra information.

Remarks

This structure is contained by the INPUT structure and used with the SendInput function.

See Also

Simulating Input