Ticket #10842 (closed defect: fixed)

Opened 6 years ago

Last modified 9 months ago

Grab of key 'Super' doesn't work good -> should be fixed in major releases after 4 July 2016

Reported by: Konstigt Owned by:
Priority: major Component: GUI
Version: VirtualBox 4.1.18 Keywords:
Cc: Guest type: Windows
Host type: Linux


Using Ubuntu 12.04 w/ Unity as host and Windows XP as guest, I can press the Super-key (Windows-key) to get the start menu in XP.. but it also opens up the Unity menu.

I also use Remmina RDP client. When I do the same there the key is completely mapped to the system I connect to and is not executed at my "host system".

Change History

comment:1 Changed 6 years ago by michael

Do you use keyboard grabbing in Remmina to intercept that key? We are not doing that at the moment as it causes a lot of problems with GNOME applications which expect to be able to grab the keyboard at any time (and can't if we have it).

comment:2 Changed 6 years ago by agerber85

Are you saying that the Auto Capture Keyboard feature is designed not to grab the super key? If that's true, the feature's screentip should probably be corrected. It currently reads:

"...When the keyboard is captured, all keystrokes (including system ones like Alt-Tab) are directed to the VM."

That description seems to indicate that the Super key should be captured, as well.

I'm not sure what GNOME applications would have "lots of problems" if they couldn't grab the super key on the host system while the user is operating in the guest system. I do, however, know of one user who has had lots of problems because he thought he was installing something on the guest system when he was actually installing it on the host system.

comment:3 Changed 6 years ago by michael

Sorry, I didn't see your update to this ticket. Regarding GNOME applications which fail, as far as I recall:

  • Metacity tries to capture the keyboard whenever a window is dragged to that it sees the escape key being pressed. If another application has captured the keyboard it refuses to let you drag windows.
  • GNOME applications try to capture the keyboard whenever you open a menu in order to see keyboard short-cuts. If they can't capture the keyboard then shortcuts fail to work.
  • GNOME screen-saver captures the keyboard when it kicks in for security reasons. If another application has it captured it either refuses to start, or worse it starts but doesn't get keyboard input so that you can't enter your password to stop it again.

So on X11 hosts we do a limited sort of keyboard capturing (we capture all keys which are not already captured by another application, but we don't prevent applications from doing a full keyboard grab) which worked well until Ubuntu/Unity started doing permanent grabs of the Super key. Unfortunately X11 only provides those two grabbing modes, and since Unity gets the key first there is not much we can do about it.

A nice fix for this issue would be to let the user do a full keyboard grab which is automatically released after they have entered a key sequence or after a time-out. Sadly this is too much work to just implement it quickly "in a break", and not high enough priority for us to find time for it since we have plenty of other more urgent tasks to be completed, so for now it is on the rainy day task list. If it would help (but would it?) we could see if we could re-word the caption.

comment:4 Changed 6 years ago by e_orz

I have the same problem (using Win7 as guest).

The problem is even worse when HUD is on. Each time that I press the Alt key the guest OS loses the focus on the keyboard (and when in full screen, it took me some time to understad what happened because I didn't see the HUD bar). The work in the guest OS became practically impossible. I had to turn off HUD.

I really hope it will be fixed soon (considering the time constrains).


comment:5 Changed 4 years ago by michael

Marked ticket #12660 a duplicate of this one. Note again that Ubuntu really shouldn't be capturing the Super and Alt keys, as that is asking for this sort of thing.

comment:6 Changed 3 years ago by kilaka

I think that you have your capturing disabled. Right ctrl (default) to enable it.

comment:7 Changed 2 years ago by bslezak

If I may, I understand there are technical challenges to capturing the Super key directly but it seems a workaround would be worth the effort. When running an OS such as Windows 8.1 as a guest, the Super key is so vital to moving around the menu systems it does hinder the experience. Is it not possible to at least map a host key combination that simulates the super key in the guest OS? Thanks for consideration.

comment:8 Changed 2 years ago by zulli

Just to put some more weight on that: Having Ubuntu 16.64/64 host and Windows 10 guest, I'm a heavy keyboard-user often using the 'windows key' - and this is very unusable with Virtualbox at the moment. (with VMWare it works quite well, so technically, it seems to be solvable ;-)).

comment:9 Changed 2 years ago by michael

  • Component changed from other to GUI
  • Summary changed from Grab of key 'Super' doesn't work good to Grab of key 'Super' doesn't work good -> should be fixed in major releases after 4 July 2016

This should be fixed in any future major releases, including betas.

comment:10 Changed 18 months ago by paalfe

This is a problem for me using Ubuntu 16.04 64-bit and VirtualBox 5.1.12 running Windows 10.

comment:11 Changed 9 months ago by michael

  • Status changed from new to closed
  • Resolution set to fixed

comment:12 Changed 9 months ago by corpusr

Resolution set to fixed

michael, could you please point me to the @rev this has been fixed?

thank you

comment:13 Changed 9 months ago by michael

For 5.1 we (I) completely rewrote keyboard capturing for Linux hosts. Previously we used XGrabKeyboard in full screen mode and seamless, and XGrabKey in other modes. Now we use XGrabKeyboard everywhere for simplicity and to fix this problem. It is hard to point to a specific revision.

Note: See TracTickets for help on using tickets.
ContactPrivacy policyTerms of Use