Page 1 of 1

unable to disable hotkeys for separate sites?

Posted: 16 Jun 2021, 01:47
by milkygirl90
code as per below. I tried changing the sequence too but the # Space is still in effect.

Code: Select all

#If WinActive("ahk_group MyBrowsers") ;ALL BROWSERS HERE
Capslock::
SendInput #{Space}
return

#IfWinActive Reddit Submit ahk_group MyBrowsers
::Capslock::Capslock

Re: unable to disable hotkeys for separate sites?

Posted: 16 Jun 2021, 03:35
by swagfag
i dont see anything wrong with the code

Re: unable to disable hotkeys for separate sites?

Posted: 17 Jun 2021, 00:27
by milkygirl90
it's not disabled on reddit though..

Re: unable to disable hotkeys for separate sites?

Posted: 17 Jun 2021, 02:04
by gregster
::Capslock::Capslock is a auto-replace hotstring, not a hotkey - and it replaces the string Capslock with the string Capslock... :think:

I guess, disbling Capslock should look more like this:

Code: Select all

Capslock::return
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

#IfWinActive Reddit Submit ahk_group MyBrowsers
Capslock::return

#If WinActive("ahk_group MyBrowsers") ;ALL BROWSERS HERE
Capslock::
SendInput #{Space}
return
(Docs: "If more than one variant is eligible to fire, only the one closest to the top of the script will fire.")

Re: unable to disable hotkeys for separate sites?

Posted: 17 Jun 2021, 02:14
by milkygirl90
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... :think:

I guess, disbling Capslock should look more like this:

Code: Select all

Capslock::return
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

#IfWinActive Reddit Submit ahk_group MyBrowsers
Capslock::return

#If WinActive("ahk_group MyBrowsers") ;ALL BROWSERS HERE
Capslock::
SendInput #{Space}
return
(Docs: "If more than one variant is eligible to fire, only the one closest to the top of the script will fire.")
sorry.. what I meant is to disable the Capslock::Win+Space combo when I'm on reddit, not to disable the capslock functionality itself.

Re: unable to disable hotkeys for separate sites?

Posted: 17 Jun 2021, 02:17
by gregster
Perhaps just:

Code: Select all

#If WinActive("ahk_group MyBrowsers") && !WinActive("Reddit Submit")	;ALL BROWSERS HERE
Capslock::
SendInput #{Space}
return