[Solved] A simple Host/Guest switcher? Is there a key?

This is for discussing general topics about how to use VirtualBox.
Post Reply
abcdefgh
Posts: 77
Joined: 22. Jul 2018, 03:29
Primary OS: MS Windows 7
VBox Version: PUEL
Guest OSses: Linux Mint 20.3 Mate

[Solved] A simple Host/Guest switcher? Is there a key?

Post by abcdefgh »

Hello.

The VBox 'Input' 'Keyboard' 'Keyboard Settings...' menu selection opens a "VirtualBox - Preferences" dialog.
The "VirtualBox - Preferences" dialog has many settings. But I've not found a setting that does what I want. Perhaps it's there and I simply can't find it.

Is there a setting that will simply switch back-&-forth (with each switcher keypress) between the Host (with its current window focus) and the Guest (with its current window focus). That is the operation that I most often need to do, and sorely miss, but I don't know (and haven't discovered) how to do it.

For example, suppose that the Host is focused on a text editor and that the Guest is focused on a web browser. Switching quickly and cleanly between the two windows, one in the Host and the other in the Guest, would greatly facilitate cutting and pasting text between them. Is there a Keyboard Setting that can be bound that will allow me to switch back-&-forth, directly between the text editor and the web browser? If yes, what is the key binding named? The User Manual seems to not contain any details for 'Keyboard Settings...' and the actual dialog provides little help.

Thanks, and Best Regards, Mark.
Last edited by abcdefgh on 14. Jun 2019, 07:52, edited 1 time in total.
I'm actually markfilipak (which somehow became 'markfilipak2', then 'abcdefgh'). I've been here since 15 Jul 2012 but lost my name during the great shift to SSO (single sign-on) during 2017, and have not been able to recover it.
erdeslawe
Volunteer
Posts: 241
Joined: 8. Jul 2015, 10:23

Re: A simple Host/Guest switcher? Is there a key?

Post by erdeslawe »

Try:

HOST KEY + TAB to switch to VM
HOST KEY, HOST KEY + TAB to switch out of VM
abcdefgh
Posts: 77
Joined: 22. Jul 2018, 03:29
Primary OS: MS Windows 7
VBox Version: PUEL
Guest OSses: Linux Mint 20.3 Mate

Re: A simple Host/Guest switcher? Is there a key?

Post by abcdefgh »

erdeslawe wrote:Try:

HOST KEY + TAB to switch to VM
That doesn't work at all. You do mean that I should press the host key and while it's held down, press tab? Correct?
HOST KEY, HOST KEY + TAB to switch out of VM
As soon as I hit the host key and let it go, a "VirtualBox - Information" notice pops up that I have to [Cancel] via mouse click. I get no opportunity to hit the host key a 2nd time.

I've been using VBox for about 10 years. I've never been able to get these functions to work.

What have you chosen as your host key?

PS: What would work perfectly, I think, is ALT+TAB with a combined switcher queue. Such a combined queue would simply switch between the various windows, in the host & in the guest, in the order that they were last in. But the VBox developers don't seem to want to also manage the host & guest switcher queues, so such a combined window queue doesn't appear to be possible.

PPS: Actually, as I think of this further, VBox would not need to manage the respective queues, nor would it need to combine them. All it would need to do is: Upon ALT+TAB, change focus from host-to-guest (or guest-to-host) and pass the ALT+TAB to the new focus.

PPPS: Actually, it shouldn't pass the ALT+TAB to the new focus because doing so would also switch within the host (or guest) that is receiving focus. So all that's needed is change the focus from host-to-guest (or guest-to-host). But there doesn't appear to be a key binding for that simple function.
I'm actually markfilipak (which somehow became 'markfilipak2', then 'abcdefgh'). I've been here since 15 Jul 2012 but lost my name during the great shift to SSO (single sign-on) during 2017, and have not been able to recover it.
erdeslawe
Volunteer
Posts: 241
Joined: 8. Jul 2015, 10:23

Re: A simple Host/Guest switcher? Is there a key?

Post by erdeslawe »

Well it works fine for me and always has. Never had a problem, but I don't mess with the default Keyboard Mapping, i.e. the Host Key is the default Left OPTION/CMD on Mac keyboards.

Can only suggest that you double check what your Host Key is set as for your OS, because it seems that you may have been remapping your keyboard and could have some form of conflict. The Key Commands are simply as I said, i.e. HOST KEY + TAB is the equivalent of ALT + TAB (Windows) to switch between Apps on a Windows system & HOST, HOST + TAB (in the Guest) returns keyboard control to the Host with the first press of the HOST Key, followed by HOST + TAB To cycle through/select from the running Host Apps.
abcdefgh
Posts: 77
Joined: 22. Jul 2018, 03:29
Primary OS: MS Windows 7
VBox Version: PUEL
Guest OSses: Linux Mint 20.3 Mate

Re: A simple Host/Guest switcher? Is there a key?

Post by abcdefgh »

Well, you've made it clear. I thank you. But every time I try to configure the key bindings, the key binding dialog passes the key strokes I make on to the Windows Host and that screws things up, the key binding dialog loses focus.
I'm actually markfilipak (which somehow became 'markfilipak2', then 'abcdefgh'). I've been here since 15 Jul 2012 but lost my name during the great shift to SSO (single sign-on) during 2017, and have not been able to recover it.
abcdefgh
Posts: 77
Joined: 22. Jul 2018, 03:29
Primary OS: MS Windows 7
VBox Version: PUEL
Guest OSses: Linux Mint 20.3 Mate

Re: A simple Host/Guest switcher? Is there a key?

Post by abcdefgh »

Well, I have one-half of the mystery solved, and it really wasn't a mysery.

I can switch host-to-guest via ALT+TAB -- I do that all the time and wasn't thinking because this browser is (and I am) in the guest -- but there's no way back to the host without using the mouse. I assume that host-to-guest via ALT+TAB simply utilizes the existing Windows switcher and that VBox is really not involved at all. Thus, my quest reduces to a way to implement guest-to-host. Since the guest is Linux, and since ALT+TAB is already bound in Linux, I assume I must find another way.

I've not found a way to rebind the Linux switcher to something other than ALT+TAB. So it appears that VBox must capture and control the guest's switcher. I certainly don't know how to do that.

PS: Even if I did find a way to capture and control the guest's switcher there would still be a problem: There seems no function to which to bind. That is, the "VirtualBox - Preferences" dialog, 'Input' section, _/Virtual Machine\_ tab seems to not have such a function to which to bind. To be honest, it seems amazing to me that such a basic function would go unaddressed by the VBox developers.
I'm actually markfilipak (which somehow became 'markfilipak2', then 'abcdefgh'). I've been here since 15 Jul 2012 but lost my name during the great shift to SSO (single sign-on) during 2017, and have not been able to recover it.
abcdefgh
Posts: 77
Joined: 22. Jul 2018, 03:29
Primary OS: MS Windows 7
VBox Version: PUEL
Guest OSses: Linux Mint 20.3 Mate

Re: A simple Host/Guest switcher? Is there a key?

Post by abcdefgh »

erdeslawe wrote:... HOST, HOST + TAB (in the Guest) returns keyboard control to the Host with the first press of the HOST Key ...
THAT'S what's missing. My host key (by itself) does nothing ...
... followed by HOST + TAB To cycle through/select from the running Host Apps.
... and that's exactly what I DON'T want to happen.

Update: I discovered that my host key DOES return control to the host. It just provides no indication of it. It works exactly as you described, erdeslawe. ...I don't like it. It means that when I want to go from host-to-guest, I have to do one thing, but when I want to go from guest-to-host, I have to do a different thing. That sucks. That's essentially no different in concept than what I'm doing now, which is transferring to the mouse to accomplish it. If I stick with the mouse for both, at least the interface is consistent. I'll have to do that.

Thanks for your help, erdeslawe. I'm sorry to have taken up your time. May you live as long as you choose, and in good health.
I'm actually markfilipak (which somehow became 'markfilipak2', then 'abcdefgh'). I've been here since 15 Jul 2012 but lost my name during the great shift to SSO (single sign-on) during 2017, and have not been able to recover it.
abcdefgh
Posts: 77
Joined: 22. Jul 2018, 03:29
Primary OS: MS Windows 7
VBox Version: PUEL
Guest OSses: Linux Mint 20.3 Mate

Re: A simple Host/Guest switcher? Is there a key?

Post by abcdefgh »

For Posterity...

After about 10 years using VBox, this comes as a shock. I honestly did not know that pressing and releasing the host key (mine is R-Ctrl) while in the guest, immediately returns control (focus) out of the guest and into VBox. It apparently is the only case in which the host key is used without a 2nd key. I will be reviewing all documention to determine whether this oversight was my fault.

Thanks to erdeslawe's kind & patient assistance, I have found consistency.
If I press R-Ctrl then Alt+Tab while in a guest child window, the R-Ctrl switches focus to VBox, and then the Alt+Tab switches focus to the host child window from which I last left.
If I press R-Ctrl then Alt+Tab while in a host child window, the R-Ctrl does nothing, and the Alt+Tab switches focus to VBox (which itself is focused on the guest child window from which I last left).
In both cases, R-Ctrl then Alt+Tab does the same thing, just in opposing directions.
Though I'm not happy having to perform an extra keypress, I'll get used to it. It accomplishes what I intended.

Thanks again, erdeslawe!
I'm actually markfilipak (which somehow became 'markfilipak2', then 'abcdefgh'). I've been here since 15 Jul 2012 but lost my name during the great shift to SSO (single sign-on) during 2017, and have not been able to recover it.
erdeslawe
Volunteer
Posts: 241
Joined: 8. Jul 2015, 10:23

Re: [Solved] A simple Host/Guest switcher? Is there a key?

Post by erdeslawe »

Glad you worked it out.

I understand that the extra Key Press might seem non-intuitive at first, but it isn't any more complex than the 3/4 key combinations sometimes required once you get used to the combination. Of course unlearning 10 years of conditioning/practice/expectation is a challenge, so good luck.

The way I understand it is that control has to be first returned to the Host OS to enable program switching/cycling, so that's in reality a single key press 'HOST KEY' the second part of the process is actually using the normal Key Combination to cycle through the running programs on your real PC.
abcdefgh
Posts: 77
Joined: 22. Jul 2018, 03:29
Primary OS: MS Windows 7
VBox Version: PUEL
Guest OSses: Linux Mint 20.3 Mate

Re: [Solved] A simple Host/Guest switcher? Is there a key?

Post by abcdefgh »

erdeslawe wrote:Glad you worked it out ...
Yesterday, VBox's behavior completely changed. Now I cannot Alt+Tab in the Guest at all. And when I press the host key, I get a popup: "You have clicked the mouse inside the Virtual Machine ..."
viewtopic.php?f=1&t=93546&p=450972#p450972
I'm actually markfilipak (which somehow became 'markfilipak2', then 'abcdefgh'). I've been here since 15 Jul 2012 but lost my name during the great shift to SSO (single sign-on) during 2017, and have not been able to recover it.
Post Reply