Opened 7 years ago
Last modified 7 years ago
#1447 assigned enhancement
Multitouch trackpad does not work on Windows 10
Reported by: | Tom Goddard | Owned by: | Tom Goddard |
---|---|---|---|
Priority: | moderate | Milestone: | |
Component: | Window Toolkit | Version: | |
Keywords: | Cc: | ||
Blocked By: | Blocking: | ||
Notify when closed: | Platform: | all | |
Project: | ChimeraX |
Description
Multitouch 2-finger rotation and 3-finger translation does not work on a Windows laptop with a multitouch trackpad (computer model MSI GS65). It appears Qt is not delivering any touch events. Some post suggested that those events are delivered in QWindow::event() instead of the documented QWindow::touchEvent() on Windows.
Change History (3)
comment:1 by , 7 years ago
comment:2 by , 7 years ago
Unless the MSI GS65 laptop I tested on is unusual in reporting no touch devices from the Windows API call GetSystemMetrics(), there appears to be no hope to make multitouch work on Windows 10 as even Windows 10 seems to only support it through UWP.
We would need to test other Windows laptops to be more certain, but I don't have access to any other Windows 10 laptops.
comment:3 by , 7 years ago
Type: | defect → enhancement |
---|
It might be possible to get Windows trackpad to work using native Universal Windows Platform APIs instead of Qt but this would be a good bit of work.
It appears Qt 5.11 does not support Windows multitouch trackpads -- these are called precision touchpads in Windows speak. The MSI GS65 laptop with Windows 10 I tested supports multitouch gestures like two-finger drag to scroll many apps and Qt gets those scroll events.
QTouchDevice.devices() returns a 0 element list. Looking at the Qt code in qtbase-5.11/src/plugins/platforms/windows the createTouchDevice() routine in qwindowmousehandler.cpp is where a multitouch device is detected. It uses Win32 API call GetSystemMetrics(SM_DIGITIZER) to check. That is returning 0 meaning no multitouch device. I checked this using the win32api module (PyPi pypiwin32). The Microsoft docs suggest this call only detects devices on Windows 7 and Windows Server 2008 R2, but not clear if that is just old info (page is dated Nov 16, 2018).
At any rate it seems that Qt does not see any touch device on this laptop so there is no hope to get touch events. I did not find anything on the web indicating if GetSystemMetrics(SM_DIGITIZER) can every identify a laptop touchpad with Windows 10.
I tried QWindows touchEvent() and event() routines and touch events are not delivered on the ChimeraX graphics window.
The translateGestureEvent() routine in the same Qt5 source file is a noop, suggesting Qt 5.11 also does not handle Windows gestures.
It looks like the modern way to access touch devices on Windows is via the Universal Windows Platform (UWP) API which targets mobile, tablet and I think desktop devices. I don't think the Qt 5.11 Windows plugin uses uwp.