Page 1 of 1

Command Q / host key combo problem

PostPosted: 21. Oct 2017, 16:45
by Virtual Charles
Hello,

There's a problem with the host key selection under Mac OS X. When I press Cmd-Q to quit an application, I get the VBox powerdown menu ("You want to ( ) save the machine state ( ) Send the shutdown signal (*) Power off the machine").

This happens whether I press the left Cmd key (default host key) or the right Cmd key.

I tried changing the host key under Input->Keyboard->Keyboard Settings to the left Option key. This does indeed work for going full screen (host-F == left Option-F), but does not work for Cmd-Q (left or right Cmd key). Vbox still captures the Cmd-Q and goes to the powerdown menu. Kind of a problem if you can't curb your Cmd-Q reflexes.

Any way to fix this? Obviously the work-around is "don't do that", but would be good to make it work right.

Running with host OS 10.11.6 (El Capitan) and guest OS 10.6.8 (Snow Leopard); VirtualBox 5.1.30.

Thanks,

Charles

Re: Command Q / host key combo problem

PostPosted: 21. Oct 2017, 19:52
by socratis
Virtual Charles wrote:Vbox still captures the Cmd-Q and goes to the powerdown menu.
Actually, it's the underlying Qt that forces that behavior. They reserve two keys: Cmd+Q and Cmd+H. And it kind of makes sense if you think about it. If Qt goes "south" you don't want to lose the ability to use that specific key combination. The host OS has to have access to the underlying mechanism to kill a rogue application. Not that it can't happen, just don't push your luck...

There was a time during a beta period that something like that got into the code by accident. You would press the left Cmd+Q and it would quit an app in the guest, while the right Cmd+Q would be captured by Qt/VirtualBox and would present the close VM dialog box. It was perfect!!! But, alas, it was breaking other things and it had to be reverted. I cried, I tried to bribe them, I threatened them, I begged, ... nope. ;)

Virtual Charles wrote:I tried changing the host key under Input->Keyboard->Keyboard Settings to the left Option key.
I have set the right Option key as my HostKey. You rarely use the HostKey, which is why I've assigned something that's not used on my everyday workflow. For example, on my Windows host I've assigned the "Application" key, aka the right-click key. I've never used that key so it seemed like the perfect candidate...

Re: Command Q / host key combo problem

PostPosted: 21. Oct 2017, 23:09
by Virtual Charles
Thanks for the explanation. I guess knowing it's a "feature" rather than a "bug" does help, although I will suppress a curse each time I try Cmd-Q instead of using the mouse and the menu.

Charles