Last active
April 30, 2025 07:14
-
-
Save yavorski/0e4be06c686cce4397ddc47cd152d1ea to your computer and use it in GitHub Desktop.
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
#Requires AutoHotkey v2.0 | |
; Send <Alt+F13> with <Alt+Escape> - Windows 11 | |
; Allows to use <Alt+Escape> mapping in Neovim on Windows 11 | |
!Esc:: | |
{ | |
static skip := false | |
if skip | |
return | |
skip := true | |
SendInput("!{F13}") | |
KeyWait("Esc") | |
skip := false | |
} | |
; <Super+`> open WT | |
; Windows Logo key + ` | |
#`:: { | |
; Windows Terminal class | |
winTitle := "ahk_class CASCADIA_HOSTING_WINDOW_CLASS" | |
if WinActive(winTitle) { | |
; Minimize if already focused | |
WinMinimize(winTitle) | |
} else if WinExist(winTitle) { | |
; Focus existing terminal | |
WinActivate(winTitle) | |
} else { | |
Run("C:\Users\" . A_Username . "\AppData\Local\Microsoft\WindowsApps\wt.exe") | |
; Wait for up to 1 second (10 * 100ms) | |
Loop 10 { | |
Sleep 100 | |
if WinExist(winTitle) { | |
WinActivate(winTitle) | |
break | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment