CodePudding user response:
See Also the Requirements of Platform SDK: Windows User Interface
SendInput
The SendInput function synthesizes keystrokes, mouse motions, and The button on.
UINT SendInput (
UINT nInputs,//the count of input events
LPINPUT pInputs,//an array of input events
Int cbSize//the size of structure
);
The Parameters
NInputs
[in] Specifies the number of structures in the pInputs array.
PInputs
[in] Pointer to an array of INPUT structures. Each structure represents an event to be inserted into the the rid_device_info_keyboard or mouse INPUT stream.
CbSize
[in] Specifies the size, in bytes, of an INPUT structure. If cbSize is not the size of an INPUT structure, the function will fail.
The Return Values
The function returns The number of events that it successfully inserted into The The rid_device_info_keyboard or mouse input stream. If The function returns zero, The input was already blocked by another thread.
To get extended error information, call GetLastError.
Few
The SendInput function inserts The events in The INPUT structures serially into The The rid_device_info_keyboard or mouse INPUT stream. These events aren 't interspersed with other The rid_device_info_keyboard or mouse INPUT events inserted either by The user (with The The rid_device_info_keyboard or mouse) or by calls to keybd_event, mouse_event, or other calls to SendInput.
This function does not reset the the rid_device_info_keyboard 's current state. Any keys that are already pressed the when the function is called took interfere with the events that This function generates the. To get This problem, check the the rid_device_info_keyboard' s state have the GetAsyncKeyState function and correct as necessary.
Requirements
Windows NT/2000/XP: Included in Windows NT 4.0 SP3 and later.
Windows 95/98/Me: Included in Windows 98 and later.
Header: Declared in Winuser. H; The include Windows. H.
Library: Use User32. Lib.
See Also
The rid_device_info_keyboard Input the Overview, the rid_device_info_keyboard Input Functions provides, Input, GetAsyncKeyState, keybd_event, mouse_event
Platform SDK Release: August 2001 What did you think of this topic?
Let us know. The Order a CD Online Platform SDK
(U.S/Canada) (International)
Requirements
Windows NT/2000/XP: Included in Windows NT 4.0 SP3 and later.
Windows 95/98/Me: Included in Windows 98 and later.
Header: Declared in Winuser. H; The include Windows. H.
Library: Use User32. Lib.
See Also
The rid_device_info_keyboard Input the Overview, the rid_device_info_keyboard Input Functions provides, Input, GetAsyncKeyState, keybd_event, mouse_event
CodePudding user response:
After listen to keyboard events, first press the send shift press event set the timer timing, once again, press theafter removing the timerIf cycle adjustable shift incidents in the keyboard events is very stupid, do you think you could meet the needs of you
Void QWidget: : keyPressEvent (QKeyEvent * event)