yekingyan
73 天前
我前几天碰到同样的问题的,罗技 G102 。
可以通过 ahk 解决。下载 AHK 软件并安装,将下面内容保存为 main.ahk 文件,然后以管理员身份运行这个文件
```ahk
#Requires AutoHotkey v2.0
class Timer { ; 延时触发一次
static PRIORITY := -1
__New(callback, delay := 1000) {
this.count := 0
this.delay := delay
this.timer := ObjBindMethod(this, "Tick")
this.isWait := false
this.callback := callback
}
Start() {
this.isWait := true
SetTimer(this.timer, -this.delay, Timer.PRIORITY)
return this
}
Stop() {
SetTimer(this.timer, 0)
this.isWait := false
return this
}
ReRun(delay := "") {
if (delay != "") {
this.delay := delay
}
this.count := 0
this.Stop()
this.Start()
return this
}
Tick() {
this.count++
this.callback()
this.isWait := false
}
isWaiting() {
return this.isWait
}
}
~LButton:: {
KeyWait "LButton"
BlockInput(true)
Timer((t) => (BlockInput(false)), 30).Start() ; 无视 30 毫秒内双击
}
```