Code: Select all
#If WinActive("ahk_group MyBrowsers") ;ALL BROWSERS HERE
Capslock::
SendInput #{Space}
return
#IfWinActive Reddit Submit ahk_group MyBrowsers
::Capslock::Capslock
Code: Select all
#If WinActive("ahk_group MyBrowsers") ;ALL BROWSERS HERE
Capslock::
SendInput #{Space}
return
#IfWinActive Reddit Submit ahk_group MyBrowsers
::Capslock::Capslock
Code: Select all
Capslock::return
Code: Select all
#IfWinActive Reddit Submit ahk_group MyBrowsers
Capslock::return
#If WinActive("ahk_group MyBrowsers") ;ALL BROWSERS HERE
Capslock::
SendInput #{Space}
return
sorry.. what I meant is to disable the Capslock::Win+Space combo when I'm on reddit, not to disable the capslock functionality itself.gregster wrote: ↑17 Jun 2021, 02:04::Capslock::Capslock is a auto-replace hotstring, not a hotkey - and it replaces the string Capslock with the string Capslock...
I guess, disbling Capslock should look more like this:Haven't tested, but you also might want to put it above the more general hotkey variant, so that it takes priority, if the Reddit condition is true.Code: Select all
Capslock::return
(Docs: "If more than one variant is eligible to fire, only the one closest to the top of the script will fire.")Code: Select all
#IfWinActive Reddit Submit ahk_group MyBrowsers Capslock::return #If WinActive("ahk_group MyBrowsers") ;ALL BROWSERS HERE Capslock:: SendInput #{Space} return
Code: Select all
#If WinActive("ahk_group MyBrowsers") && !WinActive("Reddit Submit") ;ALL BROWSERS HERE
Capslock::
SendInput #{Space}
return