Page 1 of 1

Don't send any keystrokes to VM

Posted: 15. May 2013, 21:15
by jzxu
Hi,

I'm running an Arch Linux virtual machine on a Windows 7 host, both being 64 bit OSes. Guest additions is installed and running in the VM. I have disabled the Auto Capture Keyboard option. I noticed that even after I've released the keyboard from the VM by pressing the Host key (right ctrl), as long as the VM window is active, normal keystrokes such as letters and numbers still go to the VM, but special OS keystrokes such as alt-tab and the Windows key do not. To be perfectly clear, my normal keystrokes are sent to the VM even when the keyboard capture icon in the lower right (the down arrow) is grey.

Is there any way to disable all keystrokes to the VM until I explicitly capture input by clicking inside the VM window?

Thanks.

Re: Don't send any keystrokes to VM

Posted: 16. May 2013, 10:32
by noteirak
If you have any other window open, regular keystroke would be sent to that window if it is active, so that's the OS behaviour we're talking about here. I do not see the link with Virtualbox itself

Re: Don't send any keystrokes to VM

Posted: 16. May 2013, 17:42
by jzxu
Yes, the keystrokes will be sent to the focused window. But virtualbox can still choose not to forward those keys into the VM. In other words, when the keyboard is not captured, I want nothing to happen when I type normal keys.

Re: Don't send any keystrokes to VM

Posted: 16. May 2013, 20:55
by noteirak
AFAIK it's not possible to restrict it that way but I am more a headless-frontend type of person so I could be wrong.
Hopefully Perryg can confirm this.

Re: Don't send any keystrokes to VM

Posted: 16. May 2013, 21:10
by Perryg
Currently I don't think it is possible either. The host key is really used when the guest additions are *not* installed to release the mouse but the focus of the keyboard follows the focus of the window. You would need to click out side of the guest to move the keyboard focus AFAIK.

Re: Don't send any keystrokes to VM

Posted: 17. May 2013, 03:02
by jzxu
Okay, thanks for the help.

Re: Don't send any keystrokes to VM

Posted: 17. May 2013, 10:50
by mpack
The thought occurs to investigate removing the keyboard from the VM, except that BIOSes used to fail their POST if the keyboard was missing, leading to the IBM PC's most notorious error message "Keyboard not found. Press F1 to continue"... So elegant in its simple insansity... :)

Unfortunately I don't think VBoxManage provides a way to totally disable the keyboard, and anyway that would probably be too drastic. I'm sure the OP wants something like a virtual KVM.