36

I am using a Logitech G9 mouse and running VMWare Workstation 6.5.3 on Vista x64. The guest OS is Win XP, and has the most current version of VMWare Tools installed. Left / right buttons and mouse wheel scrolling work fine in the guest OS, but the back / forward buttons are apparently not recognized.

I have tried installing the Logitech software inside the guest OS as well, but it still did not recognize the back / forward buttons. (I didn't really expect this to work since the guest OS doesn't actually see the mouse hardware as a Logitech G9 directly anyway.)

I vaguely remember seeing something a while back about editing the virtual machine config file to specify a 5-button mouse rather than the default 3-button setup, but I can't seem to find any specifics on how to do so in the VMWare documentation. Does anyone know if such a workaround exists, or is 5-button mouse functionality just not supported?

Tim Lara
  • 895
  • 3
  • 11
  • 13

10 Answers10

35

Edit the .VMX file (while VM powered off) using notepad and add the following lines:

usb.generic.allowHID = "TRUE"
mouse.vusb.enable = "TRUE"

Save file and exit notepad.

Hubro
  • 5,716
  • 14
  • 61
  • 87
Shax
  • 359
  • 3
  • 2
  • +1 This works perfectly and is really simple compared to the unnecessarily complex answers below. – Hubro Aug 04 '13 at 18:33
  • This doesn't seem to work with workstation 9 any more. – Cheetah Dec 11 '13 at 20:37
  • @Cheetah I can confirm that it do work on workstation 9. – ablacksheep Jan 17 '14 at 15:41
  • Worked for me as well with a Logitech G700 setup with Logitech Gaming Software. Using Ubuntu 14.04. Added the above lines as noted and worked immediately. – Halsafar Oct 15 '14 at 00:31
  • Worked perfectly with a Logitech G700s running Ubuntu 15.10 in Workstation 12. Thanks! – jaseeey Jan 23 '16 at 12:13
  • 1
    Why aren't these options in the GUI? Even if they are in an "advanced" menu. – Fred Feb 08 '21 at 16:31
  • This works, BUT for some reason made my VM less and less responsive over time. So after some time it's virtually unusable. After a reboot all is fine and then starts to slowly degrade. Latest VMware Workstation Pro 16.1.0 build-17198959, Windows 10 Pro 20H2 host, Ubuntu 20.04 guest. – Neurotransmitter Mar 25 '21 at 17:02
  • the `mouse.vusb.enable=TRUE` line is the only thing I added (not allowHID) and that makes it work for me (debian host and guest). Back/forward buttons work now and I can also scroll and move the mouse at the same time (both were broken before). – Luc May 09 '22 at 08:42
21

After adding usb.generic.allowHID = TRUE to the vmx file, just enable USB for that VM and then go to the Hardware Manager (guest system) and "scan for hardware changes". New USB Devices will then be recognized by the VM and after that your back/forward buttons should work without deactivating the mouse in the host system.

  • Thanks! That seems to have worked perfectly for me. Not sure if I just never tried this or if something has been fixed in VMWare Workstation 7 (I just upgraded) but either way, thanks! – Tim Lara Dec 06 '09 at 18:04
  • 7
    I just ran in to the same problem, trying to get the forward/back button to work with Ubuntu as guest OS. It turns out that I needed `mouse.vusb.enable = "TRUE"` in the .VMX-file as well to get it to work correctly. – Arjen Sep 14 '12 at 17:41
  • Has anyone else still had the problem where you need to select the mouse from the Removable Devices menu (thus disconnecting it from the host) before you're able to use the mouse, despite setting usb.generic.allowHID AND mouse.vusb.enable to true? I've got an Ubuntu host and a Red Hat guest – MattSayar Mar 12 '14 at 23:23
15

For workstation 10 you need another line in you .vmx than the previous suggestions. Now it's:

usb.generic.allowHID = "TRUE"
mouse.vusb.enable = "TRUE"
mouse.vusb.useBasicMouse = "FALSE"

https://communities.vmware.com/message/2328267#2328267

Kurt Schwemmer
  • 151
  • 1
  • 3
  • 1
    The first line appears to be unnecessary according to the discussion you linked to, and I can confirm that it works for me without the first line. I used this in my Vagrantfile to allow me to use my forward/back inside the Vagrant VM as that's where my productivity happens throughout the day. ```vmw.vmx["mouse.vusb.enable"] = "TRUE"``` and ```vmw.vmx["mouse.vusb.useBasicMouse"] = "FALSE"``` – dragon788 May 03 '16 at 16:25
  • That solution unfortunately does not work for VMWare Player 12, do you have a solution for that? – Erik Jan 02 '17 at 19:50
  • 2
    VMWare Workstation 16 user here, this worked for me. – pyrho Feb 03 '21 at 17:27
  • 1
    Why the hell is this not the default? I mean, shouldn't the back/forward work out-of-the-box? – Damn Vegetables Dec 22 '22 at 04:58
  • Workstation 16 here on Windows11 host and Ubuntu guest, the latter 2 lines worked for me, thanks! – Till Kolditz May 11 '23 at 10:44
4

Enable all mouse buttons globally for all VMs on your machine:

Windows Host:

Add

mouse.vusb.enable = "TRUE"
mouse.vusb.useBasicMouse = "FALSE"

to

C:\ProgramData\VMware\VMware Workstation\config.ini
(C:\Documents and Settings\All Users\Application Data\VMware\VMware Workstation\config.ini)

This path might be different for you, depending on how VMware is installed.

Completely restart your VM and VMWare Workstation!


Ubuntu Host:

Add (or create file if not available)

.encoding = "UTF-8"
mouse.vusb.enable = "TRUE"
mouse.vusb.useBasicMouse = "FALSE"

to

~/.vmware/config

Completely restart your VM and VMWare Workstation!

Tested with Windows 10 Host, VMWare Workstation 15 and Ubuntu 16.04 Guest

fivef
  • 213
  • 2
  • 5
2

It won't work directly. Because VMware only emulates 6 states with it's generic mouse. (left, right and middle mouse button, scroll wheel up, down, pressed)

But as a workaround you can use my tool I've just written in AutoIt for I really needed this function as well.

#include <Misc.au3>

$dll = DllOpen("user32.dll")

Opt("WinTitleMatchMode", 2)
Opt("TrayIconHide", 1)
$vm = WinWait("VMware Workstation")

While True
    If WinActive($vm) Then
        If _IsPressed("06", $dll) Then
            Send("{AltDown}{Right}")
            While _IsPressed("06", $dll)
                Sleep(1)
            WEnd
            Send("{AltUp}")
        ElseIf _IsPressed("05", $dll) Then
            Send("{AltDown}{Left}")
            While _IsPressed("05", $dll)
                Sleep(1)
            WEnd
            Send("{AltUp}")
        EndIf
    ElseIf _IsPressed("05", $dll) And _IsPressed("06", $dll) Then
        If MsgBox(1 + 262144, "Exit", "Do you really want to exit...?") == 1 Then ExitLoop
    EndIf
    Sleep(1)
WEnd

DllClose($dll)

Just compile this on your own with AutoIt or download the compiled executable from my webspace: http://jtmeyer.de/mousetool.exe This will wait for a window including "VMware Workstation" in it's Title and if any of the Thumb Mouse buttons are pressed (Code 05 + 06) the KeyCombination of Alt+Left/Alt+Right is pressed. If you press both buttons together the tool will exit if you confirm the appearing dialog box.

Samoth
  • 499
  • 5
  • 10
  • This will work with VMware Player using `$vm = WinWait("[CLASS:vmware.fullscreenwindow]")` – Brian Jul 07 '14 at 17:45
  • Great solution! I've implemented it with autohotkey but the concept is the same. The accepted solution doesn't work well for me, yes the buttons work but mouse movement feels weird (some kind of bad acceleration...). – flagg19 Dec 28 '16 at 11:17
1

as 2018:

This is a known bug of VMWare but still not solved.

I tried all of the answers. None of them worked for windows 10 under VMWare 14.1.3

Downgrading to VMWare 12.0.1 solved my problem.

Asqan
  • 111
  • 3
  • This answer: https://superuser.com/a/1535050/218929 works for Windows 10 Host, VMWare Workstation 15 and Ubuntu 16.04 Guest – fivef Mar 23 '20 at 13:12
1

At 2020:

I tested on Windows 10 and VMware Player 15

I did the following to enable the back and forward button.

  1. Remove the USB controller while VM is open

    go to: Player->Manage->Virtual Machine Setting remove USB controller from Hardware tab then click OK

  2. Power OFF VM

  3. Add below lines to .vmx file and save

     mouse.vusb.enable = "TRUE"
    
     mouse.vusb.useBasicMouse = "FALSE"
    
  4. Start VM

  5. Add USB controller after VM started

    go to: Player->Manage->Virtual Machine Setting click add button then select USB controller then click Finish Then click OK

  6. Restart VM

  7. Open terminal run this command:

      xev |grep -i "button"
    
  8. Move the mouse to the new opened Event Tester window and click the mouse button you want to enable. If you see something at the terminal, that's mean it works.

mfe
  • 111
  • 2
0

For Windows host use AutoHotKey to change mouse button mapping:

 XButton1 :: !^+{NumpadLeft}
 XButton2 :: !^+{NumpadRight}

Then in guest OS map them back:

 !^+{NumpadLeft}  :: XButton1
 !^+{NumpadRight} :: XButton2
Egon
  • 2,863
  • 1
  • 18
  • 15
  • I don't understand the downvote on this. If the other solutions do not work, I can see how this could work. – Fred Feb 08 '21 at 16:28
  • I used a similar solutions (other alternatives mentioned here also didn't work for me): I used Logi Options to map the keys in the host and AutoHotKey in the VM. – Ana María Martínez Gómez Aug 16 '21 at 17:09
0

What worked in my case was changing the compatibility for the USB controller from 3.0 to 2.0 in the VM settings.

Jason
  • 1
0

Add this parameter in your VM's VMX file.

usb.generic.allowHID = TRUE

Your buttons should now work - no installation of logitech software or anything required.

caliban
  • 20,053
  • 5
  • 51
  • 62
  • 2
    Thanks - This setting does work, but with one caveat: You have to enable USB on the guest and then "connect" the mouse to the guest via the [VM --> Removable Devices] menu. This does enable the back / forward buttons, but it also disconnects the mouse from the host OS! Since I frequently switch back and forth between the guest and the host, this is not really a workable solution for me. If you were staying within the guest OS for extended periods of time, though it would work well. If there is no further workaround, I will probably still accept this answer as correct, though. – Tim Lara Sep 05 '09 at 03:15