Closed Polisson closed 1 year ago
Excuse me but I cannot reprduce the issue. To say it short:
1) I made a ahk script containing VK06::LWin
and started it.
2) Started AltSnap with your config.
And I can: a. Move windows with WIN/MB5+LClick, Resize and close as well with RClick and MClick b Use Win+E of MB5+E to open the explorer.
So I am not sure what the issue is here.
@Polisson
Instead of VK06::LWin
Try this:
XButton2::
{
Send "{LWin Down}"
}
XButton2 up::
{
Send "{LWin Up}"
}
I tested it with both your use cases and it worked.
OK, I downgraded to AutoHotkey v1.1.36.02 and loaded in your ini.
As @RamonUnch said
VK06::LWin
works with AltSnap and Windows' native shortcuts.
My guess would be, there is a third program that may interfere on your system.
Actually I did not update AHK in years, I have version 1.1.33.02
Thanks for such quick response! So let me precise one detail: to fully and reliable test this issue, Autohotkey should be started/reloaded first and AltSnap second. After reload latter gets precedence and ahk is loosing its capabilities.
@Ichisich I don't know how you could test such code, except it looked rather like this:
XButton2::
Send {LWin Down}
return
XButton2 up::
Send {LWin Up}
return
I've also checked this before posting issue. Obviously, this respect the rule of precedence Ahk vs AltSnap. You can say, that I need always first start AltSnap, then Ahk, but if I do so, it works for a while (random, few minutes time when AltSnap taking control and Ahk stops working in manner of MB5).
@Polisson I posted in v2 syntax, my bad.
Switching the start/loading order seems to have no implication on my system.
I have no any other remapping software on this system. So maybe it's more Windows 10 specific problem. I've tested only on one machine (HP Zbook laptop), Win 10 Pro 22H2 build 19045.2486, Ahk 1.1.36.02, AltSnap 1.58. I'm considering now to test with Ahk v2, but won't upgrade my setup for now.
Switching the start/loading order seems to have no implication on my system.
Same for me.
In theory it should not matter because the new Wnkey that is generated by AHK should be forwarded to all hooks to the system whichever their order in the chain.
I have a lats hypothesis about elevation, check if both AltSnap and AHK are started at the same privilege, ie if you run one of them elevated, they should be both, otherwise they should both run as users.
Writing again long, but @RamonUnch was first, anyway:
Nope, same on Ahk2. Furthermore, I've just checked on a second workstation (Win 10 20H2). Tested privileges and admin rights before making issue (all 4 combinations: user-user, user-admin, admin-user, admin-admin). Thinking why you can't reproduce my issue, I realized one thing: I always use modifier key only on very beginning for a very short time. Precising: for long action, modifier is stroked on start and when action is just triggered key is released. AltSnap triggers action by Hotkey+click, but hotkey is needed only for triggering and not for all the time of action (you don't have to hold Hotkey to continue moving or resizing). My muscles reflex reproduce sequence:
If I do it with mouse in an uncomfortable (and inconsistent with keyboard) way, like:
Please, also during the reproducing be cautious and focused because if you make two actions in order, e.g. move and immediately resize, you won't perceive that LWin is down all the time of those two actions. Just do one of them, then drag inside any window.
Now I can reproduce, quite annoying indeed, I will investigate...
Have a try with this hooks.dll (for x64 version of AltSnap) hooks1.59test5_x64.zip
Yes! It works like expected now. Of course, I will use it on a daily basis to test it deeper, but for now, the issue looks resolved.
Firstly, thanks for such a great software!
Context: I've just moved from quite similar way of managing windows after few years with Autohotkey script (much fewer options but still comprehensive). This technique used simple remap like
VK06::LWin
which means 5th mouse button = Left Win key. I could then use the mouse button like a Win key modifier.Use cases of my previous setup:
Issue: Using AltSnap completely covers usecase 1. (even enhances it greatly) and completely breaks usecase 2. I know that I can set 5th mouse button to act like a hotkey but I'm loosing ability to use it like Win key (as documentation says, "... buttons will not be usable outside of AltSnap")
Possible solutions:
Few my artifacts: Key history from ahk, presenting simple action of moving window with 5th button remapped to Lwin in scenario: hold 5th, hold LMB, release 5th, move (invisible here), release LButton:
My AltSnap.ini file. AltSnap 1.58 Windows 10 Autohotkey 1.x