RamonUnch / AltSnap

Maintained continuation of Stefan Sundin's AltDrag
GNU General Public License v3.0
2.08k stars 66 forks source link

Weird behavior when holding the alt key #518

Closed PanterM closed 4 months ago

PanterM commented 5 months ago

I'm very sorry if there is an option I missed or this is addressed somewhere in the wiki but I can't find it.

My problem is that when I hold the alt key and move a window it locks it to my current screen/monitor.

When rezising it locks it horizontally and only snaps vertically to certain positions depending on how high or low I am from the center of the middle section of the window

If I let go of the key while moving or resizing it's completely fine. Is this a bug or a feature I'm missing somewhere?

The version I'm using is the latest version 1.62

RamonUnch commented 5 months ago

Strange behavior, does it happen when you use WinKey as a hotkey? Also maybe you are using Alt Gr and in this case depending on your keymap it can actually behave as Alt+Ctrl. In this case AltSnaps Cannot see the difference between you pressing simply Alt or Alt+Ctrl. The solution would be then to use a different hotkey.

RamonUnch commented 5 months ago

To be sure you can check what your Alt key sends to the Test Window available in the Advanced tab of the config: For Example here is what happens with a french keymap: image

PanterM commented 5 months ago

Ah that would be it, I use right alt because I have hotkeys on my main Alt key. I did see the Test Window log but thought it was standard behavior as I didn't encounter a problem with it before (when using altdrag). I have it bound to an additional mouse button I have so rebinding it to something else shouldn't be a problem.

Edit: Forgot to thank you for the quick reply and the solution. I'm incredibly glad someone is continuing altdrag and adding features to a program I thought would be left behind, so thank you very much.

RamonUnch commented 4 months ago

I did see the Test Window log but thought it was standard behavior as I didn't encounter a problem with it before (when using altdrag).

Indeed AltDrag was avoiding this by ignoring the Ctrl key when it was pressed before Alt, however this would not be nice when using the Ctrl key modifier because it means you had to be pressing the keys in the right order.

I guess I could do a workaround (not sure what yet) but I wonder if it is worth it.

RamonUnch commented 4 months ago

Actually the fix is trivial, Try with this build, it ignores the Ctrl key if it is a simulated key.

AltSnap1.63fix2_x64.zip