Hi, I have a very peculiar setup and would like to have the cursor warp to the next monitor instead of getting stuck in against the edges of the monitor:
thanks
Is this possible with autohotkey?Warp cursor across monitors with different sizes/dpis
- JoeWinograd
- Posts: 2202
- Joined: 10 Feb 2014, 20:00
- Location: U.S. Central Time Zone
Re: Warp cursor across monitors with different sizes/dpis
I hope you'll find this article and script to be helpful:
Keyboard shortcuts (hotkeys) to move mouse in multi-monitor configuration - AutoHotkey Script
Be sure to read all the comments under the article (click the VIEW MORE button to see all of them). That's where the very interesting DPI-scaling discussion occurs. Regards, Joe
Keyboard shortcuts (hotkeys) to move mouse in multi-monitor configuration - AutoHotkey Script
Be sure to read all the comments under the article (click the VIEW MORE button to see all of them). That's where the very interesting DPI-scaling discussion occurs. Regards, Joe
Re: Warp cursor across monitors with different sizes/dpis
madeup numbers, change them according to ur own resolutions!
but u can use other general purpose software for it too
https://web.archive.org/web/20210623093438/https://superuser.com/questions/1119204/move-mouse-proportionally-between-different-resolution-and-dpi-displays
https://web.archive.org/web/20210623094028/https://github.com/dale-roberts/MouseUnSnag/
https://web.archive.org/web/20210623094136/https://superuser.com/questions/865469/how-to-make-the-mouse-wrap-from-corners-when-moving-between-monitors
https://web.archive.org/web/20210623094141/https://www.autohotkey.com/boards/viewtopic.php?t=65644#p282017
Code: Select all
#NoEnv
#Persistent
#SingleInstance Force
SetBatchLines -1
hHook := DllCall("SetWindowsHookEx"
, "Int", 14 ; WH_MOUSE_LL
, "Ptr", RegisterCallback("LowLevelMouseProc", "Fast")
, "Ptr", 0
, "UInt", 0
, "Ptr")
LowLevelMouseProc(nCode, wParam, lParam) {
x := NumGet(lParam + 0, "Int")
y := NumGet(lParam + 4, "Int")
switch wParam ; The identifier of the mouse message.
{
case 0x200: ; WM_MOUSEMOVE
switch
{
case (x < 0 && y > 500): DllCall("SetCursorPos", "Int", -1, "Int", 499) ; main ->> left panel
case (x > 1920 && y > 500): DllCall("SetCursorPos", "Int", 1921, "Int", 499) ; main ->> right panel
case (x < 200 && y < 0): DllCall("SetCursorPos", "Int", -1, "Int", 201) ; top ->> left panel
case (x > 1600 && y < 0): DllCall("SetCursorPos", "Int", 1921, "Int", 201) ; top ->> right panel
}
}
return DllCall("CallNextHookEx", "Ptr", 0, "Int", nCode, "Ptr", wParam, "Ptr", lParam, "Ptr")
}
https://web.archive.org/web/20210623093438/https://superuser.com/questions/1119204/move-mouse-proportionally-between-different-resolution-and-dpi-displays
https://web.archive.org/web/20210623094028/https://github.com/dale-roberts/MouseUnSnag/
https://web.archive.org/web/20210623094136/https://superuser.com/questions/865469/how-to-make-the-mouse-wrap-from-corners-when-moving-between-monitors
https://web.archive.org/web/20210623094141/https://www.autohotkey.com/boards/viewtopic.php?t=65644#p282017
Who is online
Users browsing this forum: Bing [Bot] and 135 guests