v2 problem with left/right modifiers? (< >) Topic is solved

Report problems with documented functionality
robinson
Posts: 6
Joined: 12 Sep 2019, 20:28

v2 problem with left/right modifiers? (< >)

13 Sep 2019, 06:28

First let me say I'm an AHK noob, and I don't really understand what's going on, so it could be my fault.
However... adding < to one of my hotkeys makes another (seemingly totally separate) hotkey of mine be totally ignored.
I'm using v2.0-a104. Here's essentially what it looks like:

#If WinActive("ahk_exe notepad.exe")
^a::SendInput("^s")
#If
#If WinActive("Everything ahk_exe Everything.exe")
^a::SendInput("^!p")
#If

When it's like this, both work fine, however...
If I turn that ^a:: on the second-last line into <^a::
then the ^a:: on the second line just gets totally ignored; impossible to trigger.
I made a (blurry) YouTube video demonstrating it.
https www.youtube.com /watch?v=bGBWI8zb5uY&feature=youtu.be Broken Link for safety
Is this a legit bug or just me being a noob?
lexikos
Posts: 6668
Joined: 30 Sep 2013, 04:07
GitHub: Lexikos

Re: v2 problem with left/right modifiers? (< >)

21 Sep 2019, 17:54

Neither hotkey stops working; RCtrl+A will still trigger the first hotkey.

This is by design.

With the first version, you have two variants of one hotkey. When you press LCtrl+A, AutoHotkey resolves the combination to the hotkey ^a, then evaluates each variant.

After you change one to <^a, you have two separate hotkeys, each with one variant. When you press LCtrl+A, AutoHotkey resolves the combination to the hotkey <^a, then evaluates its #If criteria. Either there's a match, or the hotkey does not fire.

A similar limitation applies to cases where one key can match one hotkey by scancode and another hotkey by virtual keycode. With the exception of wildcard hotkeys, each key-press or release can only resolve to one hotkey (which can have multiple variants).

But since there's already an exception for wildcard hotkeys, perhaps it can be extended to other cases.
lexikos
Posts: 6668
Joined: 30 Sep 2013, 04:07
GitHub: Lexikos

Re: v2 problem with left/right modifiers? (< >)  Topic is solved

29 Sep 2019, 00:10

Although it was by design, I agree it was undesirable. I found that the workaround in place for wildcard hotkeys was very easily applied to other types of hotkeys.

Fixed by v2.0-a105 and v1.1.31.00.

Return to “Bug Reports”

Who is online

Users browsing this forum: No registered users and 14 guests