diff --git a/windows/autohotkey/RemapCapsCtrlEscapeV2.ahk b/windows/autohotkey/RemapCapsCtrlEscapeV2.ahk new file mode 100644 index 0000000..189894d --- /dev/null +++ b/windows/autohotkey/RemapCapsCtrlEscapeV2.ahk @@ -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}" + } +} \ No newline at end of file