键盘按住 - KeyDown
函数简介
按住指定的虚拟键码。
接口名称
KeyDown
DLL调用
int KeyDown(long ola, int vk_code);
参数说明
| 参数名 | 类型 | 说明 |
|---|---|---|
| ola | 长整数型 | OLAPlug对象的指针,由 CreateCOLAPlugInterFace 接口生成。 |
| vk_code | 整数型 | 按键码。 |
示例
C++
long instance = CreateCOLAPlugInterFace();
// 按住Ctrl键 (VK_CONTROL = 0xA2),再按C键实现复制
KeyDown(instance, 0xA2);
KeyPress(instance, 0x43); // 'C' 键
KeyUp(instance, 0xA2);
Python
# 待补充
返回值
1 成功,0 失败。
