Open selomkofori opened 2 years ago
According to https://github.com/asweigart/pyautogui#keyboard-and-mouse-control
Currently, PyAutoGUI only works on the primary monitor. PyAutoGUI isn't reliable for the screen of a second monitor (the mouse functions may or may not work on multi-monitor setups depending on your operating system and version).
I also assume this could cause issues with the failsafe. https://pyautogui.readthedocs.io/en/latest/#fail-safes
It is also in the roadmap https://pyautogui.readthedocs.io/en/latest/roadmap.html I haven't done anything here before, so I don't have any say anywhere, but I'm sure assistance with that issue would be appreciated.
See also, #192
SetCursorPos API has a bug relating to having multiple monitors with different dimensions.
If the cursor is in secondary Monitor B and you move it to Monitor A, the X position MAY be bounded incorrectly.
Issue is explained here https://stackoverflow.com/questions/65519784/why-does-setcursorpos-reset-the-cursor-position-to-the-left-hand-side-of-the-dis
The workaround is to call SetCursorPos twice. Posting this as an issue because it may not be obvious why the bug is happening in pyautogui.
The reason I propose it be fixed in pyautogui is so that it works consistently in the api and across platforms.