libuiohook icon indicating copy to clipboard operation
libuiohook copied to clipboard

Distinguish mouse and touch events

Open raphaelmenges opened this issue 1 year ago • 1 comments

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 avatar May 26 '24 13:05 raphaelmenges

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

raphaelmenges avatar May 26 '24 13:05 raphaelmenges