And in the case the key has been pressed for less than 3 seconds, I do not want anything to happen, and execute the normal function of the key is executed as usual.
This is my attempt, but I don't know why it comes out of the code even if the required key has been pressed for less than 3 seconds
Code: Select all
$End::
KeyWait, End, t.3
IF ErrorLevel
SoundBeep, 800, 400
Else
ExitApp
KeyWait, End
ToolTip,% "U have been pressed End " A_TimeSinceThisHotkey " ms"
Return
Code: Select all
$q::
KeyWait, q, t.3
IF ErrorLevel
SoundBeep, 800, 400
Else
SendInput, q
KeyWait, q
ToolTip,% "U have been pressed Q " A_TimeSinceThisHotkey " ms"
Return
Thanks you