lua - 在lua中按住一个键
问题描述
是否可以在lua中按住一个键,例如'a'?我不是说用 doKeyPress(VK_A) 按下键然后循环它,而是实际按住它一段时间。
解决方案
你想要的是keyDown()
相反。
https://wiki.cheatengine.org/index.php?title=Lua:keyDown
你最终会想要执行一个keyUp()
命令来释放它。
https://wiki.cheatengine.org/index.php?title=Lua:keyUp
通过触发事件(您自己的键或鼠标单击)
或在指定时间后使用计时器来 keyUp()。
编辑:
https://wiki.cheatengine.org/index.php?title=Lua:sleep
keyDown(VK_A)
休眠(5000)
keyUp(VK_A)
推荐阅读
- javascript - 部署到 Github Pages 后未显示 Angular 图像
- mysql - SQL 版本 MySQL 5.5 中的排序列
- outlook - 无法使用 MS Graph API 上传大型附件
- arrays - 如何将选定对象从一组对象推入一个对象数组
- python - Conv2D model.fit 的请求张量校正错误
- android - 使用 webview 加载特殊站点
- python - 如何在 tkinter 中调用我保存的 python 文件?
- python - 如何使用 NumPy 将包含字符串和浮点值的 CSV 文件读入二维数组
- python - 如何使用熊猫按国家/地区列将数据拆分为一个工作簿中的多个工作表
- computer-forensics - 在 windows 2000 中应用程序无法在 WIN32 模式下运行