Last active
August 7, 2023 13:56
-
-
Save conr/fe0fbec5eb41d01d2099c7601a1ef946 to your computer and use it in GitHub Desktop.
Remap LWin to LCtrl when Windows Terminal is focused (Auto Hot Key)
This file contains 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
; Remap LWin to LCtrl when Windows Terminal is focused (Auto Hot Key) | |
#IfWinActive ahk_class CASCADIA_HOSTING_WINDOW_CLASS ; Check if Windows Terminal is active | |
LWin::LCtrl ; Remap left Windows key to left Ctrl key | |
#IfWinActive | |
; Script to assign alt+` and alt+escape the functionality to cycle through windows of the same application. | |
!`:: | |
WinGetClass, OldClass, A | |
WinGet, ActiveProcessName, ProcessName, A | |
WinGet, WinClassCount, Count, ahk_exe %ActiveProcessName% | |
IF WinClassCount = 1 | |
Return | |
loop, 2 { | |
WinSet, Bottom,, A | |
WinActivate, ahk_exe %ActiveProcessName% | |
WinGetClass, NewClass, A | |
if (OldClass <> "CabinetWClass" or NewClass = "CabinetWClass") | |
break | |
} | |
!Esc:: | |
WinGetClass, OldClass, A | |
WinGet, ActiveProcessName, ProcessName, A | |
WinGet, WinClassCount, Count, ahk_exe %ActiveProcessName% | |
if (WinClassCount = 1) | |
return | |
Loop, 2 { | |
WinSet, Bottom,, A | |
WinActivate, ahk_exe %ActiveProcessName% | |
WinGetClass, NewClass, A | |
if (OldClass <> "CabinetWClass" or NewClass = "CabinetWClass") | |
break | |
} | |
return |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment