keybd_event详解
来源:互联网 发布:网络中立性 编辑:程序博客网 时间:2024/04/30 05:33
The keybd_event function synthesizes a keystroke. The system can use such a synthesized keystroke to generate a WM_KEYUP or WM_KEYDOWN message. The keyboard driver's interrupt handler calls the keybd_event function.
VOID keybd_event(
BYTE bVk, // virtual-key code
BYTE bScan, // hardware scan code
DWORD dwFlags, // flags specifying various function options
DWORD dwExtraInfo // additional data associated with keystroke
);
Parameters
bVk
Specifies a virtual-key code. The code must be a value in the range 1 to 254.
bScan
Specifies a hardware scan code for the key.
dwFlags
A set of flag bits that specify various aspects of function operation. An application can use any combination of the following predefined constant values to set the flags:
Value Meaning
KEYEVENTF_EXTENDEDKEY If specified, the scan code was preceded by a prefix byte having the value 0xE0 (224).
KEYEVENTF_KEYUP If specified, the key is being released. If not specified, the key is being depressed.
dwExtraInfo
Specifies an additional 32-bit value associated with the key stroke.
Return Values
This function has no return value.
Remarks
Although keybd_event passes an OEM-dependent hardware scan code to Windows, applications should not use the scan code. Windows converts scan codes to virtual-key codes internally and clears the up/down bit in the scan code before passing it to applications.
An application can simulate a press of the PRINTSCREEN key in order to obtain a screen snapshot and save it to the Windows clipboard. To do this, call keybd_event with the bVk parameter set to VK_SNAPSHOT, and the bScan parameter set to 0 for a snapshot of the full screen or set bScan to 1 for a snapshot of the active window.
- keybd_event详解
- keybd_event
- keybd_event
- keybd_event函数详解(请别忽视了scan codes!)
- VC++模拟键盘输入(keybd_event() 、 PostMessage() /SendMessage()、SendInput())详解
- VC++模拟键盘输入(keybd_event() 、 PostMessage() /SendMessage()、SendInput())详解
- screen_capture keybd_event
- keybd_event函数
- mouse_event & keybd_event
- Mouse_event Keybd_event
- keybd_event使用方法
- 关于keybd_event
- keybd_event 转载
- keybd_event使用方法
- keybd_event使用方法
- keybd_event() function
- keybd_event使用方法
- keybd_event使用方法
- JSR184,我学完自己做的程序
- C++中关键字typename有什么作用
- 7.13 我该如何动态分配多维数组 ?
- 神不知鬼不觉的开始学ASP了,郁闷
- VC6.0中使用ADO操作Access数据库
- keybd_event详解
- 怎样成为优秀的软件模型设计者?
- String C /C++
- ajxa 学习
- 谈 数组的初始化
- 经典字符串Hash函数测试
- 微软拼音输入法和向SQL SEVER 2005数据库表中填写数据是时发生“ 输入法无效“问题
- Ajax的JSP示例以及相关知识
- 关于51单片机P0口的结构及上拉问题