How configure VirtualBox shortcuts to switch between virtual computer and host with single key combination on windows 10

Does one of these works for you:

  • Host key + m, minimize virtualbox os window,
  • Click Host key once and release to let the vm lose focus, then Alt + Tab, switch to a window of residing os,

Tips:

  • The Host key is used to transfer focus to residing os, on windows or linux it's right Ctrl by default.
  • If the vm already lose focus, then you don't need to press the Host key first, otherwise you need to press once & release, to transfer focus back to residing os.
  • If you switch back to the vm again via Alt + Tab, then vm will get focus again, then to get back to residing os, you need to press Host key again.

The virtualbox Auto Capture Keyboard option

(from File -> Preference -> Input).

Behavior:

  • If checked, then you need Host key to return focus to residing os, just as described above.
  • If unchecked, then vm is just treated as a simple window in host. You can use Alt + Tab to switch to a window from host anytime, without press the Host key first. But, you also can't switch within windows inside the vm, via Alt + Tab any more.

Which to use:

There is a trade off, it depends on what you use the vm for to decide whether check it or not.
In my case:

  • When I am using Windows vm on a Linux host.
    In the Windows vm browser with proxy is the only thing I need most of the time, and most of the time I am on Linux host.
    So I uncheck it, so that never need to click Host key to get back to Linux host.
  • When I am using Linux vm on a Windows host.
    Actually most of the time I am working on the linux vm, and sometimes need to go to the Windows host.
    So I check it, so that I can switch between windows of Linux vm via Alt + Tab, and when I need to go back to Windows host, I click Host key first or use mouse.