INPUT
Collapse the table of content
Expand the table of content

INPUT structure

Used by SendInput to store information for synthesizing input events such as keystrokes, mouse movement, and mouse clicks.

Syntax


typedef struct tagINPUT {
  DWORD type;
  union {
    MOUSEINPUT    mi;
    KEYBDINPUT    ki;
    HARDWAREINPUT hi;
  };
} INPUT, *PINPUT;

Members

type

Type: DWORD

The type of the input event. This member can be one of the following values.

ValueMeaning
INPUT_MOUSE
0

The event is a mouse event. Use the mi structure of the union.

INPUT_KEYBOARD
1

The event is a keyboard event. Use the ki structure of the union.

INPUT_HARDWARE
2

The event is a hardware event. Use the hi structure of the union.

 

mi

Type: MOUSEINPUT

The information about a simulated mouse event.

ki

Type: KEYBDINPUT

The information about a simulated keyboard event.

hi

Type: HARDWAREINPUT

The information about a simulated hardware event.

Remarks

INPUT_KEYBOARD supports nonkeyboard input methods, such as handwriting recognition or voice recognition, as if it were text input by using the KEYEVENTF_UNICODE flag. For more information, see the remarks section of KEYBDINPUT.

Requirements

Minimum supported client

Windows 2000 Professional [desktop apps only]

Minimum supported server

Windows 2000 Server [desktop apps only]

Header

Winuser.h (include Windows.h)

See also

Reference
GetMessageExtraInfo
SendInput
keybd_event
mouse_event
HARDWAREINPUT
KEYBDINPUT
MOUSEINPUT
Conceptual
Keyboard Input

 

 

Community Additions

ADD
Show:
© 2016 Microsoft