VOID WINAPI mouse_event
(
_In_ DWORD dwFlags,
_In_ DWORD dx,
_In_ DWORD dy,
_In_ DWORD dwData,
_In_ ULONG_PTR dwExtraInfo
);
- dwFlags 鼠标的操作动作。
- dx,dy 鼠标坐标位置。
- dwData [in]
Type: DWORD
If dwFlags contains MOUSEEVENTF_WHEEL, then dwData specifies the amount of wheel movement. A positive value indicates that the wheel was rotated forward, away from the user; a negative value indicates that the wheel was rotated backward, toward the user. One wheel click is defined as WHEEL_DELTA, which is 120.
- 如果dwFlags 是MOUSEEVENTF_WHEEL的话,dwData会确定滚轮是怎样转动的,如果是正值是向前转,负值是向后转,如果滚轮被点击值为120.
-
If dwFlags contains MOUSEEVENTF_HWHEEL, then dwData specifies the amount of wheel movement. A positive value indicates that the wheel was tilted to the right; a negative value indicates that the wheel was tilted to the left.
If dwFlags contains MOUSEEVENTF_XDOWN or MOUSEEVENTF_XUP, then dwData specifies which X buttons were pressed or released. This value may be any combination of the following flags.
If dwFlags is not MOUSEEVENTF_WHEEL, MOUSEEVENTF_XDOWN, or MOUSEEVENTF_XUP, then dwData should be zero.
Value Meaning - XBUTTON1
- 0x0001
Set if the first X button was pressed or released.
- XBUTTON2
- 0x0002
Set if the second X button was pressed or released.
- dwExtraInfo [in]
Type: ULONG_PTR
An additional value associated with the mouse event. An application calls GetMessageExtraInfo to obtain this extra information.
VOID WINAPI keybd_event
(
_In_ BYTE bVk,
_In_ BYTE bScan,
_In_ DWORD dwFlags,
_In_ ULONG_PTR dwExtraInfo
);
- bVk [in]
Type: BYTE
A virtual-key code. The code must be a value in the range 1 to 254. For a complete list, see Virtual Key Codes.
- dwFlags [in]
Type: DWORD
Controls various aspects of function operation. This parameter can be one or more of the following values.
Constant/value | Description |
---|---|
|
Left mouse button |
|
Right mouse button |
|
Control-break processing |
|
Middle mouse button (three-button mouse) |
|
X1 mouse button |
|
X2 mouse button |
|
Undefined |
|
BACKSPACE key |
|
TAB key |
|
Reserved |
|
CLEAR key |
|
ENTER key |
|
Undefined |
|
SHIFT key |
|
CTRL key |
|
ALT key |
|
PAUSE key |
|
CAPS LOCK key |
|
IME Kana mode |
|
IME Hanguel mode (maintained for compatibility; use VK_HANGUL) |
|
IME Hangul mode |
|
Undefined |
|
IME Junja mode |
|
IME final mode |
|
IME Hanja mode |
|
IME Kanji mode |
|
Undefined |
|
ESC key |
|
IME convert |
|
IME nonconvert |
|
IME accept |
|
IME mode change request |
|
SPACEBAR |
|
PAGE UP key |
|
PAGE DOWN key |
|
END key |
|
HOME key |
|
LEFT ARROW key |
|
UP ARROW key |
|
RIGHT ARROW key |
|
DOWN ARROW key |
|
SELECT key |
|
PRINT key |
|
EXECUTE key |
|
PRINT SCREEN key |
|
INS key |
|
DEL key |
|
HELP key |
|
0 key |
|
1 key |
|
2 key |
|
3 key |
|
4 key |
|
5 key |
|
6 key |
|
7 key |
|
8 key |
|
9 key |
|
Undefined |
|
A key |
|
B key |
|
C key |
|
D key |
|
E key |
|
F key |
|
G key |
|
H key |
|
I key |
|
J key |
|
K key |
|
L key |
|
M key |
|
N key |
|
O key |
|
P key |
|
Q key |
|
R key |
|
S key |
|
T key |
|
U key |
|
V key |
|
W key |
|
X key |
|
Y key |
|
Z key |
|
Left Windows key (Natural keyboard) |
|
Right Windows key (Natural keyboard) |
|
Applications key (Natural keyboard) |
|
Reserved |
|
Computer Sleep key |
|
Numeric keypad 0 key |
|
Numeric keypad 1 key |
|
Numeric keypad 2 key |
|
Numeric keypad 3 key |
|
Numeric keypad 4 key |
|
Numeric keypad 5 key |
|
Numeric keypad 6 key |
|
Numeric keypad 7 key |
|
Numeric keypad 8 key |
|
Numeric keypad 9 key |
|
Multiply key |
|
Add key |
|
Separator key |
|
Subtract key |
|
Decimal key |
|
Divide key |
|
F1 key |
|
F2 key |
|
F3 key |
|
F4 key |
|
F5 key |
|
F6 key |
|
F7 key |
|
F8 key |
|
F9 key |
|
F10 key |
|
F11 key |
|
F12 key |
|
F13 key |
|
F14 key |
|
F15 key |
|
F16 key |
|
F17 key |
|
F18 key |
|
F19 key |
|
F20 key |
|
F21 key |
|
F22 key |
|
F23 key |
|
F24 key |
|
Unassigned |
|
NUM LOCK key |
|
SCROLL LOCK key |
|
OEM specific |
|
Unassigned |
|
Left SHIFT key |
|
Right SHIFT key |
|
Left CONTROL key |
|
Right CONTROL key |
|
Left MENU key |
|
Right MENU key |
|
Browser Back key |
|
Browser Forward key |
|
Browser Refresh key |
|
Browser Stop key |
|
Browser Search key |
|
Browser Favorites key |
|
Browser Start and Home key |
|
Volume Mute key |
|
Volume Down key |
|
Volume Up key |
|
Next Track key |
|
Previous Track key |
|
Stop Media key |
|
Play/Pause Media key |
|
Start Mail key |
|
Select Media key |
|
Start Application 1 key |
|
Start Application 2 key |
|
Reserved |
|
Used for miscellaneous characters; it can vary by keyboard. For the US standard keyboard, the ';:' key |
|
For any country/region, the '+' key |
|
For any country/region, the ',' key |
|
For any country/region, the '-' key |
|
For any country/region, the '.' key |
|
Used for miscellaneous characters; it can vary by keyboard. For the US standard keyboard, the '/?' key |
|
Used for miscellaneous characters; it can vary by keyboard. For the US standard keyboard, the '`~' key |
|
Reserved |
|
Unassigned |
|
Used for miscellaneous characters; it can vary by keyboard. For the US standard keyboard, the '[{' key |
|
Used for miscellaneous characters; it can vary by keyboard. For the US standard keyboard, the '|' key |
|
Used for miscellaneous characters; it can vary by keyboard. For the US standard keyboard, the ']}' key |
|
Used for miscellaneous characters; it can vary by keyboard. For the US standard keyboard, the 'single-quote/double-quote' key |
|
Used for miscellaneous characters; it can vary by keyboard. |
|
Reserved |
|
OEM specific |
|
Either the angle bracket key or the backslash key on the RT 102-key keyboard |
|
OEM specific |
|
IME PROCESS key |
|
OEM specific |
|
Used to pass Unicode characters as if they were keystrokes. The VK_PACKET key is the low word of a 32-bit Virtual Key value used for non-keyboard input methods. For more information, see Remark in KEYBDINPUT, SendInput, WM_KEYDOWN, and WM_KEYUP |
|
Unassigned |
|
OEM specific |
|
Attn key |
|
CrSel key |
|
ExSel key |
|
Erase EOF key |
|
Play key |
|
Zoom key |
|
Reserved |
|
PA1 key |
|
Clear key |