The INPUT structure is 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
- Specifies the type of the input event. This member can be one of the following values.
mi
INPUT_MOUSE- The event is a mouse event. Use the mi structure of the union.
INPUT_KEYBOARD- The event is a keyboard event. Use the ki structure of the union.
INPUT_HARDWARE- Windows 95/98/Me: The event is from input hardware other than a keyboard or mouse. Use the hi structure of the union.
- A MOUSEINPUT structure that contains information about a simulated mouse event.
ki- A KEYBDINPUT structure that contains information about a simulated keyboard event.
hi- Windows 95/98/Me: A HARDWAREINPUT structure that contains information about a simulated event from input hardware other than a keyboard or mouse.
Remarks
This structure contains information identical to that used in the parameter list of the keybd_event or mouse_event function.
Windows 2000/XP: 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.
本文详细介绍了INPUT结构,该结构用于存储由SendInput合成的输入事件信息,如键盘输入、鼠标移动和点击等。文章还深入探讨了INPUT结构成员的含义及使用场景,并提供了与之相关的MOUSEINPUT、KEYBDINPUT和HARDWAREINPUT结构的具体说明。
1万+

被折叠的 条评论
为什么被折叠?



