0
votes

My script just does some hotkey replacements within the Mozilla Firefox window. It works for the most part, but after a few hotkey uses it goes haywire and forces the windows key pressed regardless of input. This makes it impossible to type.

1   sc163::!
2   
3   SetTitleMatchMode, 2
4   #IfWinActive ahk_class MozillaWindowClass
5   #s::^w
6   Return
7   #d::^Tab
8   Return
9   sc163::^l
10  Return
11  AppsKey::^w
12  Return
13  RControl::^t
14  Return
15  RAlt::^+t
16  Return
17  RShift::^!b
18  Return
19  PgDn::^+Tab
20  Return
21  #IfWinActive

When I remove lines 5-8 that use the windows key, it no longer goes haywire, but I need those hotkey replacements. Is there anything wrong with my syntax that may be causing this issue?

After launching a few hotkeys, it will permanently press the windows key even if there is no physical input from me. As if it is ghost pressing the windows key. After launching task view(windows key + tab) and refocusing the Mozilla window, the issue goes away. But comes back shortly after doing the same thing. Removing the lines 5-8 that involve the windows key in the hotkey seems to fix the problem but I need those replacements so I'm not sure to approach this.

Thanks.

1
in your code snipped, none of the returns is necessary. One-line-hotkeys / remappings already imply a return. // Also, SetTitleMatchMode, 2 will never be executed bc of the implicit return in sc163::!. Look up auto-execution section for mor e infosphil294
@Blauhirn Thanks for pointing that out. So I should just paste in the topest point of the script, not the top part of my #IfWinActive code block? Then it should be fine right?jooloo
no, you simply wanna have SetTitleMatchMode, 2 BEFORE sc163::!.phil294

1 Answers

1
votes

So I managed to fix by prepending send to the hotkey commands and making some of the combos less complex as it wasn't working well with ahk/FF in tandem.