evdev
evdev copied to clipboard
Move mouse to an absolute position.
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.
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