-
Notifications
You must be signed in to change notification settings - Fork 8
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
Move mouse between monitors #20
Comments
I'm not sure how this would work in windows see: https://learn.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-setcursorpos for x11, we currently https://github.com/AltF02/mouse-rs/blob/main/src/sys/linux.rs#L59 default to screen 0? I'm not sure if same thing for macos where we default to the main display https://github.com/AltF02/mouse-rs/blob/main/src/sys/macos.rs#L69 I am unable to test for macos and fully rely on external contributors for that :( For x11, it could be a new function, or a new parameter. What do u think? |
Thanks a lot for your response :) Actually the system I am currently most concerned about (as its needed for my use case) would be OSX. I understand that it would be most preferable to have this on all target systems, though. Unfortunately I am not at all familiar with these system specific things (though the |
Chiming in for the macOS side. Just a note, with #21 this would change the behavior described above -- coordinates will be treated as global (not relative to the main display) if the PR is accepted. The To specifically answer your question, I think you would be looking for Doing some quick digging, I think you mainly want to work with
It also has some lower level stuff but I'd recommend staying away from them if you're not comfortable with their patterns (e.g., the whole "call this function with some null/0 values, fill paramter with a length, allocate space for length, call again to fill with results" -- this is very common in low level APIs like Win32, Vulkan, etc.). Edit: fix wording |
Hi,
is there a way to determine on what monitor the mouse cursor is currently at?
I would like to write a simple utility tool, that allows to move the mouse cursor between monitors easily.
Thanks in advance
The text was updated successfully, but these errors were encountered: