I'd like to trigger an event in AutoHotkey when the user double "presses" the esc key. But let the escape keystroke go through to the app in focus if it's not a double press (say within the space of a second).
How would I go about doing this?
I've come up with this so far, but I can't work out how to check for the second escape key press:
~Esc::
Input, TextEntry1, L1 T1
endKey=%ErrorLevel%
if( endKey != "Timeout" )
{
; perform my double press operation
WinMinimize, A
}
return
Found the answer in the AutoHotkey documentation!
So for my case:
With the script above, i found out that the button i wanted to detect was being forwared to the program (i.e. the "~" prefix).
This seems to do the trick for me (i wanted to detect a double "d" press)
Source