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

Distinguish mouse and touch events #195

Draft
wants to merge 2 commits into
base: 1.3
Choose a base branch
from

Conversation

raphaelmenges
Copy link

I am aware that touch events might be out of scope of libuiohook (#62). Nevertheless, there are many touch-devices especially running Windows and it might be handy to distinguish mouse events from touch events. It appears to me that on win32-level these two kind of inputs are mixed together, but there is a flag to check whether an event was caused by a mouse or by a touch: https://stackoverflow.com/questions/45473673/how-to-distinguish-touch-vs-mouse-event-from-setwindowshookex-in-c-sharp

I have drafted a solution for Windows in this pull request. I personally am fine with it functioning on Windows only, yet, I understand if this can only be merged if a solution for macOS and X11 (Wayland?) is found as well.

@raphaelmenges
Copy link
Author

Strange observation: All "touched" mouse events are also recognized as being emulated.

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

Successfully merging this pull request may close these issues.

1 participant