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()
orPostMessage()
, didn't bother to pinpoint that) right window messages (WM_MOUSEWHEEL
) to VMware window, but what it actually should do is usingSendInput()
, directly emulating physical mouse. It seems that there was an option to control behavior of drivers (or, more precisely, user-mode programSynTPEnh.exe
) with filetp4table.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.