Connecting a second mouse or keyboard directly to a hosted virtual machine
search cancel

Connecting a second mouse or keyboard directly to a hosted virtual machine

book

Article ID: 310850

calendar_today

Updated On:

Products

VMware Desktop Hypervisor

Issue/Introduction

This article provides the steps to connect a second mouse and/or keyboard directly to a virtual machine.
 
If your mouse or keyboard is not working in your virtual machine, see Keyboard or mouse do not work in a hosted virtual machine (1008443).


Environment

VMware Workstation 9.x (Windows)
VMware Player Pro 7.x (Windows)
VMware Workstation 9.x (Linux)
VMware Player 5.x (Windows)
VMware Workstation 7.x (Linux)
VMware Workstation 8.x (Windows)
VMware Workstation 7.x (Windows)
VMware Workstation Player 14.x (Linux)
VMware Player 4.x (Windows)
VMware Workstation 8.x (Linux)
VMware Workstation Player 12.x (Linux)
VMware Workstation Player 15.x (Windows)
VMware Player Pro 7.x (Linux)
VMware Workstation Pro 15.x (Windows)
VMware Player 5.x (Linux)
VMware Workstation Pro 14.x (for Windows)
VMware Workstation 6.x (Windows)
VMware Workstation 10.x (Windows)
VMware Workstation 6.x (Linux)
VMware Player 7.x (Linux)
VMware Player 6.x (Linux)
VMware Workstation 11.x (for Linux)
VMware Player 6.x (Windows)
VMware Player 3.x (Windows )
VMware Workstation Player 12.x (Windows)
VMware Workstation Player 15.x (Linux)
VMware Workstation Player 14.x (Windows)
VMware Player 4.x (Linux)
VMware Player 7.x (Windows)
VMware Workstation 11.x (for Windows)
VMware Player 3.x (Linux)
VMware Workstation Pro 14.x (for Linux)
VMware Workstation Pro 15.x (Linux)
VMware Workstation 10.x (Linux)

Resolution

Mice and keyboards belong to a special class of USB devices known as Human Interface Devices (HID). By default, you cannot connect these devices to the virtual machine due to the risk of removing all human interface from the host computer. However, you can instruct the VMware product to allow these devices by modifying the virtual machine settings.

Caution: Before performing these steps, ensure that you have access to a second keyboard and/or mouse. Do not perform these steps if you only have one mouse and/or keyboard, as you will not be able to use the device(s) with your host computer while the virtual machine is running.

To connect an external keyboard and/or mouse directly to your virtual machine:

  1. Shut down the virtual machine that needs the mouse/keyboard.
  2. Plug the second mouse/keyboard into your host.
  3. Edit your virtual machine's .vmx file to include the lines below. For more information, see Locating a hosted virtual machine's files (1003880)

    usb.generic.allowHID = "TRUE"
    usb.generic.allowLastHID = "TRUE"
     
  4. Power on your virtual machine.
  5. Go to VM > Removable Devices.
  6. Find and select your keyboard/mouse.
  7. Click Connect (Disconnect from host).


Additional Information

Connecting a second mouse or keyboard directly to a Fusion virtual machine
Locating a hosted virtual machine's files
Keyboard or mouse do not work in a hosted virtual machine
2 つ目のマウスまたはキーボードをホスト型仮想マシンに直接接続する
再将一个鼠标或键盘直接连接到托管的虚拟机