键盘弹起 - KeyUp
函数简介
弹起指定的虚拟键码。
接口名称
KeyUp
DLL调用
int KeyUp(long ola, int vk_code);
参数说明
| 参数名 | 类型 | 说明 |
|---|---|---|
| ola | 长整数型 | OLAPlug对象的指针,由 CreateCOLAPlugInterFace 接口生成。 |
| vk_code | 整数型 | 按键码。 |
示例
C++
long instance = CreateCOLAPlugInterFace();
// 配合KeyDown使用:按住Shift再按A,然后弹起Shift
KeyDown(instance, 0xA0); // 按住Shift (VK_LSHIFT = 0xA0)
KeyPress(instance, 0x41); // 按下 'A' 键
KeyUp(instance, 0xA0); // 弹起Shift
Python
# 待补充
返回值
1 成功,0 失败。
