For single key hotkeys (e.g. capslock, space, etc) it is easy to use keywait, but I can't wrap my head around something like if (A_ThisHotkey = A_PriorHotkey) && (A_TimeSincePriorHotkey < 1000)
Code: Select all
#singleinstance, force
hk:="^b"
duration:=1000
Hotkey, %hk%, labelwait
Return
labelwait:
; check if hotkey is pressed for "duration" before continuing
; if hotkey is released before "duration" has passed simply return (do nothing)
Return