aaurteo wrote:But could you explain in another way what you said? I'm sorry but I can't understand. Well, do you mean that a custom combination like below
1 & 2::
...
No, I think you completely missed the point. 1 & 2 is a custom combination of two keys, and "1" is not normally a modifier key. This is what custom combinations are for.
1 & 2:: will be triggered even if you press Ctrl+1+2, or Ctrl+Shift+1+2, assuming your keyboard hardware can handle it. This is fine, because hotkeys like
^1 & 2:: are invalid. Custom combinations only allow combinations of two keys, so there's no conflict like in your OP.
Shift & WheelDown:: is using the "custom combination" syntax, but it's just a standard combination. There's no reason to use the "custom combination" syntax for this hotkey.
Anyway, my original question was because a custom combination under a #if statement like below affects other hotkeys outside the #if.
The documentation doesn't say how #If will affect other hotkeys, only how it affects variants/duplicates of
that hotkey.
The problem is that you are being inconsistent: using Shift in a custom combination
and in standard combinations. You will have similar problems if you are inconsistent with key names - i.e. Ctrl vs Control, Esc vs Escape, 1 vs vk31, etc.
I think it shouldn't happen.
It won't happen if you use the appropriate syntax.
Shadowpheonix wrote:Using 1 & 2:: will indeed stop 1 from working by itself. Placing it inside a #IfWinAcive section will not change this
You are mistaken.
When you press
1, AutoHotkey sees that it is a prefix key, and evaluates the #If criteria of each hotkey using that prefix key. If none of them are "active" at the time the prefix key is pressed, it is not blocked.
@aaurteo & @Shadowpheonix: Don't quote the entire post when replying to the last post in the thread. It serves no purpose other than to fill the page with redundant (i.e. useless) text. Either quote relevant piece(s) of the post, or use the Post Reply button, not the Quote button.