-
Notifications
You must be signed in to change notification settings - Fork 954
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[multi-monitor] moveMouse wont move to negative position on mac #88
Comments
@bradparks The negative mouse coordinates happen in a multi monitor setup. Basically anything left of your primary display may have negative coordinates. If you could provide more details on what you got from moveMousePos , what your arguments for moveMouse and the screen sizes , you can get a better answer. |
The issue is that the code doesn't have explicit multi-monitor support, so anything that works is kind of on accident. I don't think this is an issue on Windows, but for Mac I'll need to look into it. |
I think this should be made uniform across all platforms. As you said it is still a hack in Windows. Should probably get the monitor sizes before making the mouse move or throw some kind of error. That would be better. |
I agree. I guess we'll need to start with adding c functions to get the number of monitors and their sizes. |
Would be nice to have this! |
any update of this? |
I messed around with the code enough to get getPixelColor() working on Windows 10 with 2 monitors. However, in the process of doing so, I've discovered that getting multi-monitor support for every feature would be a massive undertaking. Just about everything in the src folder makes the assumption that the user only needs to operate within their primary display. In @octalmage's defense, though, it appears these files were forked from autopy—most of which haven't been updated in ~8 years. |
This is the only really big issue I'm having with this library, really wish it was implemented |
+1 |
At the end I worked around this issue like this, after having done const { exec } = require('child_process')
exec('cliclick c:.') |
This helps ->Does not support multiple monitors #26 |
The real work was from @jdan as you can see here : https://github.com/Toinane/robotjs/commits?author=jdan from his fork https://github.com/jdan/robotjs |
Hi all, i truly love this library. I'm a little late to the conversation, but I ran into mouse movement issue for multiple external displays as well. I need to support it on multiple operating systems. Are we saying this is a limitation that needs to be accepted with RobotJS? |
@teaxio Did you find any workarounds for the multi-monitor issue? |
@jkeat Did you happen to find any workarounds for the multi-monitor issue? |
I have this issue every time I use this library and it's very limiting. |
Hey... I use getMousePos to get the mouse position, and it returns negative values sometimes (multiple monitors above my laptop monitor).
I then try and use robot.moveMouse(800, -954) for example, and it only moves to 800, 0.
The text was updated successfully, but these errors were encountered: