Don't send any keystrokes to VM

Discussions related to using VirtualBox on Windows hosts.
Post Reply
jzxu
Posts: 3
Joined: 15. May 2013, 21:00

Don't send any keystrokes to VM

Post 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.
noteirak
Site Moderator
Posts: 5231
Joined: 13. Jan 2012, 11:14
Primary OS: Debian other
VBox Version: OSE Debian
Guest OSses: Debian, Win 2k8, Win 7
Contact:

Re: Don't send any keystrokes to VM

Post 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
Hyperbox - Virtual Infrastructure Manager - https://apps.kamax.lu/hyperbox/
Manage your VirtualBox infrastructure the free way!
jzxu
Posts: 3
Joined: 15. May 2013, 21:00

Re: Don't send any keystrokes to VM

Post 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.
noteirak
Site Moderator
Posts: 5231
Joined: 13. Jan 2012, 11:14
Primary OS: Debian other
VBox Version: OSE Debian
Guest OSses: Debian, Win 2k8, Win 7
Contact:

Re: Don't send any keystrokes to VM

Post 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.
Hyperbox - Virtual Infrastructure Manager - https://apps.kamax.lu/hyperbox/
Manage your VirtualBox infrastructure the free way!
Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: Don't send any keystrokes to VM

Post 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.
jzxu
Posts: 3
Joined: 15. May 2013, 21:00

Re: Don't send any keystrokes to VM

Post by jzxu »

Okay, thanks for the help.
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Mostly XP

Re: Don't send any keystrokes to VM

Post 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.
Post Reply