Hello,
I am having trouble making a script that works as following:
When w is released, I want the script to disable pressing w down for half a second.
Disable key for some time after releasing it Topic is solved
-
- Posts: 188
- Joined: 08 Jul 2019, 05:37
- Contact:
Re: Disable key for some time after releasing it
Code: Select all
#Singleinstance force
w::
n++
tooltip, % n
return
w Up::
Hotkey, w , , off
Settimer, lbl_w_on, 500
return
lbl_w_on:
Hotkey, w , , On
return
try this
Re: Disable key for some time after releasing it
Hello, thank you for your reply!
When pressing "w", a label appears next to the cursor. The label seems to behave correctly, incrementing as w is pressed or held down, but if pressed too quickly in succession, not incrementing. The problem though, is that w is actually never pressed. How to fix this problem?
When pressing "w", a label appears next to the cursor. The label seems to behave correctly, incrementing as w is pressed or held down, but if pressed too quickly in succession, not incrementing. The problem though, is that w is actually never pressed. How to fix this problem?
Re: Disable key for some time after releasing it Topic is solved
For v2:
Code: Select all
#Requires AutoHotkey v2.0
disabled := False
~w Up:: {
Global disabled := True
SetTimer enable, -500
}
#HotIf disabled
w::Return
#HotIf
enable() {
Global disabled := False
SoundBeep 1500
}