Skip to content
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 to an absolute position. #142

Open
hgaiser opened this issue Nov 28, 2023 · 1 comment
Open

Move mouse to an absolute position. #142

hgaiser opened this issue Nov 28, 2023 · 1 comment

Comments

@hgaiser
Copy link

hgaiser commented Nov 28, 2023

I'm not entirely sure what I'm doing is how it is intended, but my goal is to set the mouse cursor to an absolute position on screen (not a relative position). I assumed I could do something like in the virtual joystick example, but my cursor does not move with that example.

Should I be creating different events?

Relative mouse movements did work. A workaround could be to compute the relative movement required to move to a certain absolute position, but that's kinda ugly.

@mattfbacon
Copy link

As far as I know mice always use relative, not absolute events. You can try to emit absolute events anyway, but software won't expect it and probably won't work correctly. For example https://stackoverflow.com/questions/5190921/simulating-absolute-mouse-movements-in-linux-using-uinput

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants