4strid / mouse-control.autohotkey

AutoHotKey script for controlling the mouse with the keyboard. Fast & easy-to-use, full-fledged software replacement for a physical mouse. WASD / vim movement and vim-inspired key bindings. Better alternative to Numpad Mouse.
MIT License
83 stars 16 forks source link

on extended second screen stuck in lower edge #2

Closed Konfekt closed 2 years ago

Konfekt commented 3 years ago

On a single screen your application works wonderfully, but once the mouse cursor reaches another extended screen it goes downwards to the edge of the screen and is stuck there; no way to move the cursor anymore in normal mode.

4strid commented 3 years ago

i did notice this when using a friend's computer recently ... i am not sure why this happens . i'm sure i used to use this on a multimonitor system with both 2 and 3 screens with no hitches when i was a developer .

4strid commented 3 years ago

(fat thumbed close button)

4strid commented 3 years ago

one thing i can think of is that i always had my first 2 monitors slightly offset vertically , which may have masked the bug .

i don't have good access to a windows machine any more to test this on , but i will attempt a patch nonetheless .

Konfekt commented 3 years ago

I cannot reproduce that it works on two screens with either vertical offset (first screen below/above the other one) between them

Konfekt commented 2 years ago

MoveMouseToMonitor is so far the only one that gets mouse movement across monitors in AHK right.

Konfekt commented 2 years ago

It turns out that this issue only occurs when screen scaling is different from 100%; otherwise the mouse movement works fine across two screens. This is probably due to different resolutions of the screens.

4strid commented 2 years ago

awesome discovery ! but uh . ummm . well , i assume this is still a problem for you though ? i may have access to a Windows PC soon and can try and come up with a version using MoveMouseToMonitor and accounting for scaling . Any idea how we can figure out what the scaling is ?...

Konfekt commented 2 years ago

Apparently there is a built-in variable to figure out the DPI scaling.

4strid commented 2 years ago

huh . turns out it was a 1-line fix xD . . . i thought i was going to have to gut the whole thing and manually deal with per-monitor DPI , but on a whim , i decided to just throw that line in and presto

Konfekt commented 2 years ago

Wow, thank you very much!