Created
October 8, 2021 15:10
-
-
Save JoeGlines/acac49b9d042c1c0bd4f9145c71134da to your computer and use it in GitHub Desktop.
longpess escape for 3 seconds to go to sleep
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#SingleInstance,Force | |
;~ http://www.autohotkey.com/board/topic/80697-long-keypress-hotkeys-wo-modifiers/ | |
~$Esc:: ; Long press (> 0.5 sec) on Esc closes window | |
KeyWait, Escape, T3 ; Wait no more than 0.5 sec for key release (also suppress auto-repeat) | |
If ErrorLevel ; timeout, so long press | |
PostMessage, 0x112, 0xF060,,, A ;Use PostMessage to close window | |
Return |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment