Wednesday, 4 April 2018

vmware workstation - Moving the mouse cursor out of VM stops keyboard input in that VM


I am having issues with input in VMware Workstation Player 12 in windowed mode or on multiple screens. When typing something in the VM and moving mouse cursor out of the VM without clicking on anything (for example on the second screen with host OS), the typing in that VM stops until I move the cursor back into VM.


Can this feature be disabled somehow so I am able to type in the virtual machine even when cursor is outside of it?


Both guest and host are Win10 x64 OS.



Answer



Technically you can, but practically not really.


When you move the mouse cursor out of the guest screen, you're ungrabbing (releasing input) from the VM. The whole point of moving the mouse cursor out of the VM is to tell it that you no longer wish to direct input to the VM. Imagine if you could move the mouse cursor out but that the VM still took keyboard input: you'd move the mouse cursor out, click on some other window, start typing, and then keys would go to the VM, not to the window you had just clicked on. That sounds incredibly confusing. (And if you don't intend to click on another window, then why do you want to move the mouse cursor out of the VM?)


That said, you could attach a second USB keyboard to your host and then connect that as a USB device to the VM, and then your VM would have its own dedicated keyboard. (Note that doing this requires setting:


usb.generic.allowHID = "TRUE"
usb.generic.allowLastHID = "TRUE"

in the VM's .vmx file first so that USB keyboards and mice are treated like generic USB devices. See https://kb.vmware.com/kb/1033435 for more details.)




Now, maybe you don't actually want to move the mouse cursor out of the VM. Maybe you just want it to be out of the way and are trying to move it to the corner of the screen, but you're accidentally moving it out of the VM. If that's the case, then in Workstation you can avoid that by going to Edit > Preferences > Input > Cursor and unchecking "Automatically grab and ungrab the mouse". Player doesn't provide UI to change this preference, but Player uses the same preferences file, so you can manually edit the preferences file (%APPDATA%\VMware\preferences.ini on a Windows host, ~/.vmware/preferences on Linux) by closing all Player instances and adding the line:


pref.motionUngrab = "FALSE"

No comments:

Post a Comment

Where does Skype save my contact's avatars in Linux?

I'm using Skype on Linux. Where can I find images cached by skype of my contact's avatars? Answer I wanted to get those Skype avat...