Okay, so I did a research and managed to succeed.
After some thinking I came to conclusion I do not know how it works :-) It just does! :-)
Previously on «Useful :) Fun»:
In brief, Synaptics touchpad sends (SendMessage()
or PostMessage()
, didn't bother to pinpoint that) right window
messages (WM_MOUSEWHEEL
) to VMware window, but what it actually
should do is using SendInput()
, directly emulating physical mouse.
It seems that there was an option to control behavior of drivers (or,
more precisely, user-mode program SynTPEnh.exe
) with file
tp4table.dat
. Unfortunately, this option is somehow not enabled in
my drivers (though there is such a string in an executable).
So, I did the following - just injected a .dll
into VMware's window process (I hope it's safe and also hope it's not the same process that executes a VM), subclassed window procedure (meaning intercepted window messages) and translated the "wrong" ones using SendInput()
.
Also, it had been noted that the following fix is worth applying even with my solution: http://blog.alexou.net/2010/07/scrolling-in-gtk-apps-with-synaptics-driver/.
So, the source code and executables (they are only supporting Workstation, read further for Player, in "UPDATE") - ask in comment if you didn't find something - are on https://www.dropbox.com/s/gucmyo35heha6g2/vmware_scroll.zip?dl=0.
MAJOR REMARK: run the corresponding executable when a VM is running.
ANOTHER MAJOR REMARK: Don't move hook.dll
and *.exe
's after the scrolling has been turned on. If you start vmware_scroll_stop.exe
from other location it won't unlload .dll
(i.e. disable scrolling).
UPDATE: There is an enhanced version
(it was enhanced by Anthony Prieur, big thanks to him!), which also
supports VMware Player. A program derived from that called
VMWareTrackPadScroller
with a simple user interface is also available.
NOTE: There will be no version that supports horizontal scrolling, unfortunately. The thing is, there is a solution idea, but I rejected it as too dirty. To accomplish the task, one need to hook (in SynTPEnh.exe) GetClassNameW() API to modify VMware window classes' names (they are "VMware.GuestWindow" and "MKSEmbedded") or wcsicmp() to always return "not equal" when one of the argument is one of the mentioned strings. I think it's dirty solution from performance point of view, at least (that is actually a weak argument since performance penalty would be minimal). Anyway, current solution is acceptable, I think, since you don't always have device with horizontal scrolling capability and it's better to be accustomed to live without that luxury than to get suffering in poverty. BTW, in Chrome/Chromium you have Shift+Vertical Scroll
to do horizontal scroll.
Most of the time the Synaptics driver isn't the issue - it's some other process disrupting the driver. To find the culprit process, try going to the Resource Monitor to see which processes are running when this issue is occurring. Otherwise, I'd recommend you to look up Synaptics touchpad troubleshooting.
Anyhow, since Synaptics drivers are rarely the problem there are very few alternatives. One of them, though, is two-finger-scroll. Note that this application's last commit dates back to February 2009 so there might be issues with this as well.
Best Answer
I found a way to do this and I have posted a quick tutorial here: The Verge Forums. This works on my HP Spectre X360 (2017) that has a synaptics touchpad. I cannot guarantee this will work for everyone, but it is worth a shot. My tutorial is based on the findings from here (reddit post).
UPDATE
So I noticed that with this hack, the driver would break after the system woke from a sleep state. By "break" I mean the touchpad would work, but none of the touchpad settings / precision functionality would be present. Interestingly enough, this issue did not happen when the machine would wake from hibernate, only when waking from sleep. To fix this, you need to create a windows task that restarts the driver on system wake.
To begin, first you need to grab a copy of devcon.exe for your particular operating system install. See this other superuser post for that. After you have devcon.exe on your machine (in my case, I put it under C:\Program Files\DevCon) you need to identify the driver you need restarted.
Shift+Left-Click in the folder that contains devcon.exe and select the "Open CMD/PowerShell" context menu item. From here we can determine the ID of the driver we need to restart.
This command will bring up a list of different items. Look for the one with the description of "Synaptics HID-Compliant Touch pad Device" or something similar. For me, this maps to "ROOT\SYNHIDMINI\0000" which is the ID I am interested in for restarting purposes.
Once you have your ID, you need to create a scheduled task (as administrator!) to reset this device by ID. To do this, open Task Scheduler (you can search for this in the start menu) as an administrative user. Within the task scheduler window, create a new task:
Fill out the task's name (such as "Restart TouchPad On Wake") and description. Be sure to set it to run as a user with administrative privileges and to tick the "run with highest privileges" box. Also be sure to select the radio button for "Run whether user is logged in or not."
Next, click the triggers tab and create a new trigger. The trigger should begin the task on an event with the log being System and Source being Power-Troubleshooter. Event ID should be 1 (this stands for system wake).
Next, under the actions tab, create a new action. The action should be "start a program" and the Program/Script field should point to your full install path of devcon.exe. The arguments should be something like
The "@" symbol preceding your ID is important as well as the quotes!
Finally, be sure to open the conditions tab for the task and un-tick the box under the power heading that states "Start the task only if the computer is on AC power." This ensures the task still runs even when you are not plugged in.
Finally click ok and ensure that your task has been created. Now every time your system is woken up from sleep, this task will run devcon.exe and tell it to restart the synaptics driver as an administrative user. This should ensure that the driver is properly initialized for use and that you will have all of your Microsoft Precision goodness at all times.