按住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)

相关问答

错误1:Request method ‘DELETE‘ not supported 错误还原:...
错误1:启动docker镜像时报错:Error response from daemon:...
错误1:private field ‘xxx‘ is never assigned 按Alt...
报错如下,通过源不能下载,最后警告pip需升级版本 Requirem...