Eric Grange 11 Posted March 14, 2023 Hi, I have been trying to get a VCL application to react to touchpad two fingers pan, with absolutely no success 😕 But two finger pan does not seem to trigger anything AFAICT. Simple scrolling (tap and hold) and touchpad pinch-to-zoom get translated (by Windows) into scroll events just fine. Though it's not a screen touch, I tried OnGesture as well, with or with a touch manager, no success there. The two finger pan works just fine on other applications on the same laptop (Chrome, image editors, etc.), so it's a bit like the VCL application is missing a flag or something is eating/disabling the pan functionality. Am I missing something obvious and Anyone got it working ? This is a Delphi 10.3 app. Share this post Link to post
Uwe Raabe 2064 Posted March 14, 2023 Have you dropped a TGestureManager onto the form and wire it to the forms Touch.GestureManager property? In addition, the Touch.InteractiveGestures.igPan musst be active (which is by default). Share this post Link to post
Eric Grange 11 Posted March 14, 2023 (edited) Yes, I tried with or without the TGestureManager though the doc (https://docwiki.embarcadero.com/RADStudio/Sydney/en/Gesturing_Overview) says it shouldn't be there for interactive gestures, if there is no TGestureManager, I get zero OnGesture events (I only get windows conversions to scroll or mouse wheel events) The Microsoft doc (https://learn.microsoft.com/en-us/windows/win32/wintouch/windows-touch-gestures-overview) states that WM_HSCROLL & WM_VSCROLL should be received for pan, but I do not seem to get them. Edited March 14, 2023 by Eric Grange Share this post Link to post
Eric Grange 11 Posted March 14, 2023 Ok solved it! For reference the relevant Microsoft is actually this one Windows 8 touchpad gesture implementation guide While the MS doc mentions Windows 8 and says it's obsolete, it is still very much what happens in Windows 10. The touchpad pan gets mapped to WM_MOUSEWHEEL (vertical) and WM_MOUSEHWHEEL (horizontal), that last one is not exposed in the VCL as of Delphi 10.3 The pan translations come in the WheelDelta field, so they can be easily mapped to whatever you need.  1 Share this post Link to post