I want to respond to a long tap on a touchpad to abort accelerated scrolling (like in Chrome the user can rest their finger(s) on the touchpad at some arbitrary time to stop long scrolling). Surprisingly this is turning out to be extremely frustrating since the touchpad isn't sending a WM_LBUTTONDOWN message separately, but only the DOWN/UP pair if the tap is short enough. In essence, it's only sending clicks, but not long presses.
And it's not just my app. This web-based example isn't receiving the inputs either: https://w3c.github.io/uievents/tools/mouse-event-viewer.html
What's more annoying is that for instance Chrome and Windows' own settings apps seem to be able to respond to a long tap.
Here's what I've tried and concluded:
- raw input doesn't discern the events either
- it's not related to gestures (WM_GESTURE)
- it's not related to touch (WM_TOUCH after registering)
- down/up events from touchpad buttons and a dedicated mouse are received just fine
- GetAsyncKeyState() for VK_LBUTTON returns false
What am I missing here? Is this palm rejection*? Do I have to get the event through communicating with the driver directly? If so, how, and is there a standardized way to do it?
* if the touchpad were an actual (multi)touch device, which it isn't (GetSystemMetrics(SM_DIGITIZER) reports 0), it might be possible to call RegisterTouchWindow(hwnd, TWF_WANTPALM | TWF_FINETOUCH). But this doesn't work either.