C++ 模拟按键
C++ Simulate keypress
我对C++很陌生,找不到如何模拟按键。 我想把它变成这样:
if(GetAsyncKeyState(0x52))
{
//(Make program simulate the press of number "3" key (0x33)
}
当我单击键盘上的"R"键时,我希望程序模拟3号按键(0x33(
您可以使用SendInput()
生成击键事件,就像在键盘上键入一样。您可以在此SO问题中找到更多实用信息。
您也可以尝试 SetKeyboardState((,但这只会影响当前线程。您可以在此SO问题及其答案中找到更多信息。
相关文章:
- 如何使用Google Mock来模拟gettimeofday()
- G锁定铸造到基础上会释放模拟行为
- 有什么好的方法可以让系统调用代理允许在单元测试中进行模拟
- 落砂模拟碰撞检测C++和SFML
- 在gtest.中使用fff.h模拟系统API
- 谷歌模拟和覆盖关键字
- 用C#中的并集模拟C++嵌套结构
- 在同一模拟中使用静脉和静脉_ inet内容时出现运行时错误
- 在模拟器中使用并集来模拟CPU寄存器有多合适
- 我写了一个C++程序来模拟Enigma机器.我没有得到输出
- 如何模拟不同边数的骰子滚动?
- 模拟持久按键
- 使用SIR模型的疾病爆发模拟
- 在 c++ 中模拟输入并在 JAVA 中读取它?
- 转发变量参数列表以模拟 std::thread
- 如何在谷歌模拟中匹配 C 样式数组
- 如何使用兰德随机化模拟点击
- 模拟GPS数据,以便使用Qt与Traccar一起使用
- QKeyPress - 在Qt中模拟按键
- 如何使用不同的谷歌模拟运行相同的谷歌测试用例?