Windows – Use Synaptics Touchpad Scroll in VMware Guest

synaptics-touchpadvmware-workstationwindows 7

I would like to use Synaptics "Two-Finger Scrolling" inside a VMware guest.

It works as expected on the host but VMware does not seem to support it. The mouse cursor changes to indicate that scrolling is active but the VMware guest will not respond to it.

  • VMware Workstation 7.1
  • Host and Guest OS: Windows 7 (64bit)
  • Synaptics Driver 15.0.9.0
  • Device is shown as "Synaptics LuxPad V7.4"

Is it possible to make this work somehow? (e.g. modify .vmx, change Synaptics options or with a driver that emulates "mouse wheel scrolling")

Update: I have already tried several options in the Synaptics driver but the only change was that it displayed a different mouse cursor when trying to scroll.

Best Answer

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.