Important:
This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.
A version of this page is also available for
4/8/2010

This structure is used by the SendInputfunction to synthesize keystrokes, stylus and mouse motions, and button clicks.

Syntax

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

Members

type

Indicates the type of device information this structure carries. It is one of the following values.

Value Description

INPUT_HARDWARE

The hiunion member is valid.

INPUT_KEYBOARD

The kiunion member is valid.

INPUT_MOUSE

The miunion member is valid.

mi

MOUSEINPUTstructure that contains information about simulated mouse input.

ki

KEYBDINPUTstructure that contains information about simulated keyboard input.

hi

HARDWAREINPUTstructure that contains information about a simulated input device message.

Remarks

Windows Embedded CE does not support the INPUT_HARDWARE value in the typemember.

This structure is used with the SendInputsample application.

This structure contains information identical to that used in the parameter list for a call to the keybd_event, mouse_event, or hardware_eventfunctions.

Requirements

Header winuser.h
Windows Embedded CE Windows CE 2.0 and later
Windows Mobile Windows Mobile Version 5.0 and later

See Also