-
Notifications
You must be signed in to change notification settings - Fork 123
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
Retrieve raw mouse inputs in addition to x and y. #91
Comments
It is not available directly, but it should be fairly easy to calculate with the monitor info. If you have some ideas, let me know and we can probably add it in 1.3+ |
The problem is when I reach x = 0 for instance, and I still move my mouse to the left, the x coordinate remains 0 and I can't compute the delta. |
Ah i see, it definitely sounds like something that should be added although I will have to dig into it to determine if it is possible. |
X11: https://github.com/kwhat/libuiohook/blob/1.2/src/x11/input_hook.c#L474 there is also a event(X|Y) but I don't know if that will get us where we need to go... |
It's not looking promising, x11 does not appear to support relative mouse movement among other things. This may change if wayland ever goes mainstream but I wouldn't hold my breath. There are some hack-arounds to this issue but they involve resetting the mouse to the middle of the screen which would break things for people that still need to use the mouse. I maybe able to hack something together like the uiohook_event->reserved buffer but it would only be available on some platforms. |
This may contain a workable solution via |
I think this is a duplicate of issues/21. |
This is going to wait until linux gets a rewrite. |
Evdev support for Linux is nearly complete and the pull request should cover Windows and OSX for relative mouse events. It's technically not direct input on these platforms but it should allow the tracking of the mouse beyond the border of the screen. |
Hello,
First, thank you for this library, it is very helpful.
I was wondering if we could get the raw input from the mouse in addition to the current mouse position. I'm working on an app to share a pointer between a mac and a pc, and I would like to keep tracking the delta of the mouse when the pointer reaches one of the screen borders.
Thanks
The text was updated successfully, but these errors were encountered: