Closed cktgh closed 8 months ago
I'm pretty sure we already do support win
as a modifier?
Looks like we've supported that for like, 3 years now. What exactly are you trying/?
Sorry for being unclear, I presumed that the windows key was not supported to begin with, because key presses on the windows key are not detected when modifying key bindings on the UI:
Now that I looked into it, changing a key binding (that involves the window key) manually through editing the JSON occasionally works.
Here I noticed that changes to the key bindings is registered, yet it is non-functional if there is an existing binding using the same key combinations.
e.g. win+t
is non-functional; win+n
is functional.
EDIT: I read the pull request you linked
So the list of valid combos is vanishingly small. It's all about that win+~
😢
Terminal's distant cousin iTerm2 actually supports the equivalent of what I was trying to do pretty well 😅
To mitigate the issue I have written a script in AHKv2. Unfortunately this script doesn't work with the option "Hide Terminal in the notification area when it is minimized":
#Requires AutoHotkey v2.0
#T::toggleTerminal
!^T::launchTerminal
toggleTerminal(){
if(ProcessExist("WindowsTerminal.exe")){
hwnd := WinGetID("ahk_exe WindowsTerminal.exe")
if(WinExist(hwnd)){
WinActive(hwnd) ? WinMinimize(hwnd) : WinActivate(hwnd)
}
}
else{
launchTerminal()
}
}
launchTerminal(){
Run("wt -d D:\")
}
I hope this helps anyone else who have the same issue.
Yea, Win+T looks like it's not going to work in the Terminal directly, since that's a keyboard shortcut that's reserved by the OS for focusing the taskbar (at least, that's seemingly what it does on Windows 11).
Thanks for following up!
It would be nice if we could override the key binding reservation, it can definitely be done as demonstrated by AHK, even wiithout administrator rights
I don't think anyone takes "OS reseved windows key bindings" seriously; WIN+CTRL+SHIFT+ALT+L opens Linklin in our default browser, so even the OS doesn't take it seriously 😂
(While there are similar issues I suppose this is not exactly a duplicate)
Please consider adding support for the Windows modifier key in key binding settings. Right now only the other 3 modifier keys (Ctrl, Alt and Shift) is functional.