Page 1 of 1

Ignore Command-H and Command-Q?

Posted: 7. Apr 2010, 15:40
by Bitruder
I'm running VirtualBox 3.1.6 in OS X 10.6.3 and I have my host key set to right Alt key. My guest operating system is Gentoo and I have auto keyboard capture turned on. However, when I press Command-H or even Command-Q, Virtualbox itself responds (hides the window or asks if I want to shut down even when it is fullscreen on my second monitor). However, these keys have significance in my guest operating system.

Is there anyway to get Virtualbox to completely ignore these? I only want it to respond to right alt for me!

Re: Ignore Command-H and Command-Q?

Posted: 13. Apr 2010, 17:34
by gmarik
I also subscribe for this request

Reopened ticket:
http://www.virtualbox.org/ticket/5684#comment:8

Also worth checking: http://forums.virtualbox.org/viewtopic.php?p=119230

Re: Ignore Command-H and Command-Q?

Posted: 20. Sep 2010, 11:34
by mathmason
I know this is old, but it may help someone.

You can change these key commands by entering the following at the terminal.

To replace Command-H with something less intrusive such as Command-Control-Option-H enter -

Code: Select all

defaults write org.virtualbox.app.VirtualBoxVM NSUserKeyEquivalents '{"Hide VirtualBox VM"="@~^h";}'
Similarly to replace Command-Q with Command-Control-Option-Q enter -

Code: Select all

defaults write org.virtualbox.app.VirtualBoxVM NSUserKeyEquivalents '{"Quit VirtualBox VM"="@~^q";}'
To replace both (cetting one clears the other) enter -

Code: Select all

defaults write org.virtualbox.app.VirtualBoxVM NSUserKeyEquivalents '{"Quit VirtualBox VM"="@~^q"; "Hide VirtualBox VM" = "@~^h";}'

Re: Ignore Command-H and Command-Q?

Posted: 13. Feb 2012, 21:51
by CoreyOConnor
I added a patch to the issue above that resolves this issue.

Re: Ignore Command-H and Command-Q?

Posted: 26. Aug 2013, 17:04
by buckett
Remapping CMD-H and CMD-Q stops the guest OS window hiding/quiting but doesn't seem to allow these keystrokes to be passed through to the guest.
This is under VirtualBox 4.2.16.