autohotkey v2 for windows

This commit is contained in:
Noah Masur 2024-06-02 08:08:05 -04:00 committed by GitHub
parent 196d2e53e0
commit 7a22e798fc
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -0,0 +1,24 @@
#Requires AutoHotkey v2.0
#SingleInstance
ih := InputHook("B L1 T1", "{Esc}")
*Ctrl::
{
ih.Start()
reason := ih.Wait()
if (reason = "Stopped") {
Send "{Esc}"
} else if (reason = "Max") {
Send "{Blind}{Ctrl down}" ih.Input
}
}
*Ctrl up::
{
if (ih.InProgress) {
ih.Stop()
} else {
Send "{Ctrl up}"
}
}