Code: Select all
; Press ESC twice
~ESC::
IF !(A_TickCount < ESC)
{
KeyWait, ESC
ESC := A_TickCount + 250 ;1.5 seconds between releasing LAlt then pressing it again
Return
}
ESC =
Run, notepad.exe
Return
; Long Press ESC and Hold
$ESC::
KeyWait ESC, T1
If ErrorLevel {
run, calculator.exe
}
KeyWait ESC
Else Send {ESC}
Return