VirtualBox

Opened 14 years ago

Closed 7 years ago

Last modified 6 years ago

#6769 closed defect (fixed)

Alt-Tab doesn't work within guest while in fullscreen mode -> fixed in 5.1.10

Reported by: Pavel Sutyrin Owned by:
Component: other Version: VirtualBox 3.2.0
Keywords: desktop, keyboard Cc:
Guest type: Windows Host type: Linux

Description (last modified by Michael Thayer)

That is, it brings me out of VBox window at the host Gnome desktop (as if I'd restored keyboard before that with Host key)

Though it works in-guest while machine is in windowed mode.

This started to happen after upgrade from 3.1.8.

Change History (44)

comment:1 by Pavel Sutyrin, 14 years ago

host is x86_64, VBox is installed from .run package.

comment:2 by Mike Uchima, 14 years ago

Seeing the exact same thing here. Ubuntu 8.04 x86_64 host, Ubuntu 10.04 x86_64 guest. Using the 3.2.0 .deb file from the VirtualBox downloads page.

comment:3 by Pavel Sutyrin, 14 years ago

Well, if it matters, I've got VT-x-less host CPU, running 32-bit guest Windows XP.

comment:4 by Christian Pötzsch, 14 years ago

Please try VBox 3.2.2.

comment:5 by Pavel Sutyrin, 14 years ago

Thanks for reply.

With 3.2.2 behaviour is slightly different.

  1. After starting machine in fullscreen mode I do Alt-TAB successfully in-guest, once.
  1. Next stroke of Alt-TAB works outside VBox (so, I go to, say, main VBox manager window).
  1. Then Alt-TAB works in Gnome, so I jump back into fullscreened machine.
  1. Then Alt-TAB works in-guest, once.
  1. Next stroke of Alt-TAB brings me outside VBox. Go to 3.

comment:6 by Pavel Sutyrin, 14 years ago

Well, 3.2.2 seems to behave as described above in fullscreen and windowed modes both.

comment:7 by Dsen, 14 years ago

Could you please check which the window-manager are you using - metacity or compiz? If you are under GNOME then one of them could be used depending on few arguments.
At least:

  1. Default GNOME window manager is 'metacity'.
  2. But if compiz is installed and desktop environment animation is enabled then compiz is default (like in Ubuntu by default for example).

You can also just check for particular 'metacity' or 'compiz' process in process-list. Thanks in advance!

comment:8 by Pavel Sutyrin, 14 years ago

I have Debian Lenny, default Gnome desktop, which is metacity 2.28.0, which is reportedly active. I seem to have compiz installed, but no effects are enabled and no similar process is run.

comment:9 by Pavel Sutyrin, 14 years ago

Also, I notice in 3.2.2 and remember from 3.2.0 or even 3.1.8 floating effect of 'sticking' ALT key. That is, sometimes hitting X inside guest I could get Alt-X, etc.

comment:10 by Dsen, 14 years ago

It seems I'm able to reproduce something about Alt-TAB but with one more little aspect:

  1. If mouse cursor is over VM-view (view where the guest os is displayed) when guest gets Alt-TAB,
  2. Else if mouse cursor is NOT over VM-view (for example, its over the desktop) when host gets Alt-TAB.

Could you please test if you have the same behavior?

comment:11 by Pavel Sutyrin, 14 years ago

Happy to hear of a reproducible bug.

I can confirm the following:

  1. if mouse cursor is over VM-view, then Alt-TAB is flapping between host and guest as I've described.
  1. If mouse cursor is outside VM-view (outside its window), then only host gets Alt-TAB.

Hope this helps.

comment:12 by Mike Uchima, 14 years ago

Keyboard capture behavior is very confusing now in 3.2.2.

As pavel notes, the behavior is different depending on whether the mouse is over the guest desktop or not (note that I am using a dual-monitor setup where the VM is full-screen on one of the monitors).

If the mouse is over the guest desktop, then the focus cycles back and forth between windows in the guest and windows in the host. Note that it is not necessary to actually click in the guest to trigger this, just hovering the mouse anywhere over the guest's desktop is apparently sufficient.

If the mouse is not over the guest, focus merely toggles back and forth between a window on the host desktop, and the guest desktop (but not any particular window in the guest).

I have also noticed another odd behavior, which seems to be new in 3.2.2: Now, to get the guest to release the keyboard focus, I need to tap the Host key twice instead of once.

comment:13 by Pavel Sutyrin, 14 years ago

Yes, sometimes 3.2.2 needs multiple strokes of Host key, annoyingly. Need to try window managers other than metacity.

This bug could relate to #6727.

comment:14 by Crimson, 14 years ago

I filed bug6727 I'm unable to reproduce this bug. Everything works fine now except one of the problems mentioned above - that of tapping the host key twice at times.

comment:15 by Crimson, 14 years ago

Sorry, I didnt check for windowed mode. Yes, in windowed mode, 'Alt + Tab" inside guest works only when the mouse hovers over the guest window. Regression.

comment:16 by Pavel Sutyrin, 14 years ago

I would clear that in my case, if cursor is over VM-window or it is in fullscreen, not every Alt-TAB (I've tired also ALT-F4) goes to guest, but only first one. After that moment ordinary keystrokes still go to guest, but mentioned combinations go to metacity.

comment:17 by idlecoder, 14 years ago

More or less same problem here... Host: gentoo 64, virtualbox-bin 3.2.2 Guest : Windows XP 32 PRO, virtualbox guest additions 3.2.2 I tried to use several different "host key" (other than right-ctrl) but first time my guest receives a keystroke, it's like the "host key" was activated... So, every combo I use in my host are not available in my guest (ex: alt-tab)... Very very annoying... hope it will be fixed quickly.

comment:18 by Mike Uchima, 14 years ago

After using 3.2.x a bit more, I'm wondering whether the issue is that certain keyboard behaviors which were intended for Seamless mode are also affecting Fullscreen mode?

comment:19 by Ben Mendis, 14 years ago

I am seeing the same behavior with VirtualBox 3.2.2 on Slackware 13.1 with Fluxbox. This seems new since 3.1.8 which worked as expected.

Tested with a Windows XP VM with the latest guest additions installed. VT-x is enabled. I also saw this behavior with an OpenBSD VM with no guest additions so I don't think it's related to the guest OS at all.

In fullscreen mode: alt-tab alternates between being captured and not being captured. In windowed mode: If the mouse is within the VM window, tapping left-alt disables keyboard capture, but tapping it again does not restore it and alt-tab again seems to alternate. If the mouse is NOT within the VM window then alt-tab is never captured and never switches the guest's windows.

in reply to:  19 comment:20 by Heros, 14 years ago

Similar problem with VirtualBox 3.2.4 (and 3.2.2), Linux Host (KDE) and XP guest:

Every key release(!) releases the keyboard capture. The host key (right strg) works fine, I can enable and disable the capture. But the the release of any other key disables the capture. Very annoying...!

comment:21 by Ben Mendis, 14 years ago

Yikes, I didn't notice before but it is every key, not just the left-alt key.

in reply to:  15 comment:22 by Pavel Sutyrin, 14 years ago

Replying to crimsonflame123:

Sorry, I didnt check for windowed mode. Yes, in windowed mode, 'Alt + Tab" inside guest works only when the mouse hovers over the guest window. Regression.

Thanks! But, if in your case guest gets every Alt+TAB, then you seem to have this bug absent! What is your environment?..

comment:23 by Frank Mehnert, 14 years ago

Please test VBox 3.2.4. Make sure to download the latest packages with the build number 3.2.4-62467. The packages with the build number 62431 had an EFI problem and didn't contain a fix for the Alt-TAB issue.

comment:24 by Mike Uchima, 14 years ago

It works some of the time now, but not always. When it doesn't work, I can get it to start working by hitting the Host key twice, after clicking the mouse on the guest's display.

comment:25 by Ben Mendis, 14 years ago

I just installed the 3.2.4-62467 and the situation has improved.

In Windowed mode alt-tab and the host key behave exactly as expected.

In fullscreen mode:

  1. first alt-tab is captured correctly.
  2. second alt-tab is captured correctly.
  3. pressing host-key, alt-tab switches to a host window correctly.
  4. alt-tab switches back to VM.
  5. the next alt-tab switches back to the host window instead of being captured by the VM.

after alt-tabbing back to the VM, you need to press host-key twice to get it to capture alt-tabs again.

comment:26 by Dsen, 14 years ago

As sitwon described, in normal (windowed) mode all should work as expected. In frame-less modes, like fullscreen/seamless, there is still present another little bug: metacity frame-less window isn't re-captured when just pressing alt-tab, but its correctly re-captured when you, for example, press host key twice or just select window from task-bar. I'll take a look at this bug nearest time, thanks for testing it and notifying me!

comment:27 by Pavel Sutyrin, 14 years ago

At first glance, 3.2.4-62467 works for me (with metacity), thank you!

Though, there was a moment, when Alt-TABs stopped to go to guest in fullscreened VBox, and this restored after several random switchings back and forth.

comment:28 by dimitris, 14 years ago

VB 3.2.4 build 62467 on Ubuntu Lucid host, Windows XP guest in seamless mode.

With metacity: I'm having the same problem as Dsen described above.

With compiz: This problem disappears. However, due to a compiz bug I very much prefer metacity for the time being.

in reply to:  27 comment:29 by Pavel Sutyrin, 14 years ago

Replying to pavel:

At first glance, 3.2.4-62467 works for me (with metacity),

At second, doesn't entirely. After some time (or always?) after switching back to fullscreened machine Alt-TABs aren't captured by guest at all. I've managed to restore the capture by issuing ALT-F4, which go to metacity, which tries to close VBox, which offers me to shutdown machine, and after declining I'm back to guest with capture working. Another switching host windows forth and back to VBox disables it again.

Hope this pile of excessive details will help.

Thanks!

comment:30 by Frank Mehnert, 14 years ago

Please check if VBox 3.2.6 Beta 2 fixes this problem for you.

in reply to:  30 ; comment:31 by Pavel Sutyrin, 14 years ago

Replying to frank:

Please check if VBox 3.2.6 Beta 2 fixes this problem for you.

Seems to fix it, thanks!

Though, host-guest clipboard is defunct in my case, although set to 'bidirectional', I'm not sure yet as to whether to file this as a separate bug.

in reply to:  31 comment:32 by Pavel Sutyrin, 14 years ago

Replying to pavel:

Though, host-guest clipboard is defunct in my case, although set to 'bidirectional', I'm not sure yet as to whether to file this as a separate bug.

Actually, I remember it breaking about 3.2.0 or 3.2.2.

comment:33 by Frank Mehnert, 14 years ago

Resolution: fixed
Status: newclosed

So I will close this ticket. Clipboard is another story.

comment:34 by dsjstc, 13 years ago

Resolution: fixed
Status: closedreopened

Possible regression?

I have observed similar behaviour with 3.2.8_ose Ubuntu Lucid AMD64, as well as 3.2.10(sun) under Ubuntu Maverick AMD64. Occurs with both metacity and compiz.

In my case, left-alt appears to be acting as a second host key some of the time. E.g, with keyboard captured, <alt>-F4 attempts to close the VM window.

comment:35 by dsjstc, 13 years ago

NB: While the VM is in this state, the guest sees the ALT key as in a keydown state. Pressing TAB at this point sends an ALT-TAB to the guest.

Tapping the ALT key releases the state in the guest, but does not correct the problem.

in reply to:  35 comment:36 by Nerius Landys, 13 years ago

I'm using virtualbox-ose Debian package on Debian Squeeze Beta 1 amd64. 3.2.10-dfsg-1 is the version number.

I too am experiencing not being able to Alt+Tab between windows in the guest operating system when in fullscreen mode in certain cases. Actually, when I first enter fullscreen mode it does work. So for example:

  1. Enter fullscreen mode in guest OS.
  1. Check the box under "Machine" -> "Disable Mouse Integration".
  1. Alt+Tab works now in my guest OS.
  1. Hit the Host key (in my case left Windows key) and Ctrl+Alt+left-arrow over to a different desktop on host os.
  1. Ctrl+Alt+right-arrow over to guest OS (which is currently in fullscreen mode).
  1. Click on the desktop in the guest OS to start registering input (otherwise the input is still going to host OS.
  1. OK, now I'm in the guest OS again. Alt+Tab does not work. Verified that behavior is still as if "Disable Mouse Integration" were checked.
  1. As a workaround, Hit Host+f to exit fullscreen, then hit Host+f to enter fullscreen again.
  1. Click on the guest OS desktop to start sending it events.
  1. Now I can Alt+Tab between windows in the guest OS.

So the workaround is to exit fullscreen and to enter it again. Kind of annoying.

Host OS: Debain Squeeze Beta 1 amd64 Guest OS: Ubuntu 10.04.1 amd64, _all_ compiz-related packages completely removed from system

Problem seems to be related to "Disable Mouse Integration" being checked.

comment:37 by dsjstc, 13 years ago

I have observed this behaviour without ever using the "disable mouse integration" option.

comment:38 by jthurner, 10 years ago

Still seing this in 4.3.14 + extensions, Linux host (Gnome 3.12) and Win7 guest, auto-capture keyboard on.

Alt-Tab registering in the host instead of the guest is consistent for me in fullscreen (but works correctly in windowed mode).

Most of the time, normal key grabs (apart from alt-tab) still work directly after switching to the guest. Occasionally (and I can not figure out what triggers it), guest sees ALT pressed (see comment 35). A really annoying scenario is switching to the guest, start typing in an IDE and have "random" shortcuts fire instead...

An easier workaround than above is to double-tap the host key every time you switch to the guest, after which everything works as intended. The normal single press does not work in this case.

I can reproduce this consistenly, and be happy to do further debugging.

comment:39 by supersym, 10 years ago

Same here, with and with keyboard capture, my host Windows 8 running the full screen ArchLinux Xfce X environment keeps failing (read: popup/foregrounds the host Vbox manager GUI window). Also, if I miss my right arrow on this laptop I often accidentally click right control a few times. If I press it twice, I always have the host win8 ask me if I want to make it a sticky key (means it *is* listening isn't it?) or is this different due to it being the host key and actually causing my VM to lose focus without me knowing it, and THEN the alt-tab thing is going on ... I wonder. I should probably switch the host key for a while to check it out. edit: yup, unwilling accidental release of the host key on my part was causing it. Oops :P

Last edited 10 years ago by supersym (previous) (diff)

in reply to:  38 comment:40 by humbleman, 8 years ago

Replying to jthurner:

Still seing this in 4.3.14 + extensions, Linux host (Gnome 3.12) and Win7 guest, auto-capture keyboard on.

Alt-Tab registering in the host instead of the guest is consistent for me in fullscreen (but works correctly in windowed mode).

[snip]

An easier workaround than above is to double-tap the host key every time you switch to the guest, after which everything works as intended. The normal single press does not work in this case.

This is very similar to what I am seeing in a similar configuration (Linux host, Virtualbox 4.3.36, Xfce 4.10.1, Win7 guest). Windowed mode works correctly. Double tapping the host key in fullscreen works.

comment:41 by jthurner, 7 years ago

This bug seems to have been resolved - not sure in which release, or if it even was Virtualbox fault to begin with. Either way I am not affected anymore with VirtualBox 5.1.10 / Linux host (Gnome 3.22) / Win7 guest.

comment:42 by Michael Thayer, 7 years ago

Description: modified (diff)
Resolution: fixed
Status: reopenedclosed
Summary: Alt-Tab doesn't work within guest while in fullscreen modeAlt-Tab doesn't work within guest while in fullscreen mode -> fixed in 5.1.10

Thanks for the feedback.

comment:43 by rowet, 6 years ago

I am running a Windows 7 guest on VirtualBox 5.2.12 r122591 (Qt5.9.4) on a Fedora 26 host.

I cannot seem to make alt-tab in the guest work. The capture settings don't seem to matter. No matter what I do, when I hit alt-tab with the Windows guest active, another Fedora window is brought up. I can't make Windows see the alt-tab sequence and correctly cycle through panes. The guest also isn't capturing the windows start button key presses. Everything else works fine.

Any guidance would be appreciated.

in reply to:  43 comment:44 by Socratis, 6 years ago

Replying to rowet:

Any guidance would be appreciated.

If you remember the Community page, the Public bug tracker is 4th in line for advice seeking. Your first option should be the VirtualBox forums. More than 95% of the issues are resolved over there, which keeps the developers focusing on the bug fixes and enhancements.

So head over to the forums, and you'll find the answers. Just search for "alt tab full screen site:forums.virtualbox.org". If the results are not satisfactory, just open a new thread and ask your question there.

Note: See TracTickets for help on using tickets.

© 2023 Oracle
ContactPrivacy policyTerms of Use