Ubuntu

Unity/compiz intercepts Super and Alt keypresses from grabbed windows like VMs.

Reported by Matthew Ames on 2011-03-24
884
This bug affects 286 people
Affects Status Importance Assigned to Milestone
Ayatana Design
High
John Lea
Compiz
High
Unassigned
Compiz Core
High
Unassigned
OEM Priority Project
High
Unassigned
Precise
High
Unassigned
Unity
Undecided
Unassigned
compiz (Ubuntu)
High
Unassigned

Bug Description

Binary package hint: unity

After upgrading from Maverick to Natty, I can no longer use the Super (windows) key in Virtual Machine Manager. Previously, as long as I had the Virtual Machine Manager console window in the foreground, I could press the Super key and the start menu would pop up. Since upgrading to Natty, this no longer works, and the search box appears in the upper left.

Also see bug #934921

ProblemType: Bug
DistroRelease: Ubuntu 11.04
Package: unity 3.6.8-0ubuntu1
ProcVersionSignature: Ubuntu 2.6.38-7.38-generic 2.6.38
Uname: Linux 2.6.38-7-generic x86_64
NonfreeKernelModules: nvidia
Architecture: amd64
CompizPlugins: [core,bailer,detection,composite,opengl,decor,compiztoolbox,place,mousepoll,session,vpswitch,regex,wall,move,grid,resize,gnomecompat,animation,workarounds,wobbly,expo,ezoom,staticswitcher,fade,scale,unityshell]
Date: Thu Mar 24 16:31:28 2011
InstallationMedia: Ubuntu 10.10 "Maverick Meerkat" - Release amd64 (20101007)
ProcEnviron:
 LANGUAGE=en_GB:en
 LANG=en_GB.UTF-8
 SHELL=/bin/bash
SourcePackage: unity
UpgradeStatus: Upgraded to natty on 2011-03-24 (0 days ago)

Matthew Ames (supermatt) wrote :
Matthew Ames (supermatt) wrote :

Further information:
You will need virt-manager installed to replicate this.

I am also noting similar (though not *exactly* the same) behaviour in vinagre. If I press the Super key when connected to a vnc session, the key press is registered, however, if I then click on any application on my second desktop, and click on an application on my first desktop, the menu pops up again. Again, this is not something that was ever a problem before unity became my desktop.

Alex Launi (alexlauni) on 2011-03-31
Changed in unity:
status: New → Confirmed
importance: Undecided → Low
Changed in unity (Ubuntu):
importance: Undecided → Low
status: New → Confirmed
Tyler Morgan (digismack) wrote :

Holy moly this one is annoying. Not being able to user super key shortcuts in Virtualbox is a show-stopper. I feel this one should be a bit higher than low priority.

I am unable to send the Super key across Vinagre at all. Sometimes it pops up the dash on the client machine, and sometimes it does nothing at all. It never pops up the dash on the server machine--not even when Vinagre is in fullscreen mode. Using Oneiric with Unity 3D on the client and Unity 2D on the server.

Aaron C. de Bruyn (darkpixel) wrote :

It's not just in VMM. It happens in rdesktop and remmina too. Unity is grabbing the super key when it shouldn't. One of the primary benefits of Ubuntu on my desktop used to be all the rdesktop windows I would have opened to various windows machines that would all respond appropriately to ALT+TAB and SUPER+whatever. Unity blows this away.

Retitling since the consensus is that this affects all apps that forward keystrokes.

summary: - Pressing the Super (windows) key while in Virtual Machine Manager no
- longer works
+ Pressing the Super (windows) key while in full screen virtual machine or
+ remoting apps no longer works
Daniel van Vugt (vanvugt) wrote :

As mentioned in duplicate bug 806255:
---
FYI, the root cause of this bug appears to be because compiz uses XkbStateNotify, which is part of the X Keyboard Extension. Using this extension has the unfortunate side-effect (by design) of ignoring grabs held by other clients and still giving you key events even when you shouldn't be receiving them. This is documented is the spec:

"As with all Xkb events, XkbStateNotify events are reported to all interested clients without regard to the current keyboard input focus or grab state."
[http://www.x.org/releases/X11R7.6/doc/libX11/specs/XKB/xkblib.html]
---
The only remaining fix for this bug is to rewrite the modifier handling code in compiz to not use XkbStateNotify at all. Because that is the root cause of this bug. However that's a very large and risky change we can't afford to do for a while. :(
---

summary: - Pressing the Super (windows) key while in full screen virtual machine or
- remoting apps no longer works
+ Unity/compiz intercepts Super and Alt keypresses from grabbed windows
+ like VMs.
affects: unity → compiz
affects: unity (Ubuntu) → compiz (Ubuntu)
Changed in compiz-core:
status: New → Confirmed
Changed in compiz:
importance: Low → Medium
Changed in compiz-core:
importance: Undecided → Medium
Changed in compiz (Ubuntu):
importance: Low → Medium
Changed in compiz:
milestone: none → 0.9.8.0
Andrew Flegg (aflegg) wrote :

Given bug 806255 was "High" and the use of super & alt keys in VMs/Synergy is quite popular; shouldn't this be higher than "Medium"?!

zee (zeefreak) wrote :

ugh. this is driving me insane. i have a virtual machine that i use to connect to vpn to do all my corporate work. so i'm in the vm all day, alt-tabbing between windows. or at least i was. now its alt-tab esc esc esc click stab stab stab /skull.

my esc button can't take much more of this.

My workaround is to change the shortcut from the left alt to the right menu key.

snowguy (snowguy) wrote :

Alexander, did you change the shorcut on the host or the VM?

On the host which is Ubuntu 12.04 64bit.

Changed in compiz:
milestone: 0.9.8.0 → 0.9.8.1
Konstigt (konstigt) wrote :

Anyone come up with a fix or a workaround? Using a VM my whole workday this is driving me nuts..

Daniel van Vugt (vanvugt) wrote :

Try this as a workaround (for Alt only):
System Settings > Keyboard > Shortcuts > Launchers > Key to show the HUD
Click on it and tap just the right Alt key. Now (I find) the HUD only responds to the right Alt key and will ignore the left. You can use the left one in your VMs.

For Super, you can run CCSM and go:
Desktop > Ubuntu Unity Plugin > Key to show the launcher = (something other than Super)

zee (zeefreak) wrote :

another workaround [which is idiotic, but it works for me.]

i'm constantly having this issue when i try to alt-tab around in my windows vm. i've found that if i alt-tab s l o w l y, it works. alt-tab at normal uber geek speeds bring up the search window.

e.g. alt ... tab vs alttab.

Changed in compiz:
milestone: 0.9.8.2 → 0.9.8.4
Hao-Ran Liu (hzliu123) on 2012-09-14
tags: added: rls-q-incoming
Hao-Ran Liu (hzliu123) on 2012-09-14
Changed in oem-priority:
importance: Undecided → High
Hao-Ran Liu (hzliu123) wrote :

This bug is the main cause for bug 950160.

Super+P is the only way to tell Windows 8 to toggle external display. It's expected that on new laptops come with Windows 8, BIOS will only sends out Super+P for the hot key to switch external display, and this key will not work in Ubuntu.

Super key should not be consumed by Compiz/Unity, if this key is used in combination with other keys. Compiz/Unity is not the only user of the super key. gnome-settings-daemon also uses this key for toggling external display.

This is a design conflict between Compiz/Unity and g-s-d. I would like to see a real solution worked out. Otherwise, we should let Unity to handle video-out keycodes, as proposed in https://bugs.launchpad.net/unity/+bug/632632/comments/5

Daniel van Vugt (vanvugt) wrote :

See comment #7 for a "real solution". Volunteers welcome.

Changed in oem-priority:
status: New → Incomplete
Changed in compiz:
milestone: 0.9.8.4 → 0.9.9.0
Changed in oem-priority:
status: Incomplete → Confirmed
Daniel van Vugt (vanvugt) wrote :

This is not a duplicate of bug 950160. It might sound similar though.

This bug is about Compiz/Unity not honouring keyboard grabs as described in comment #7 (mostly seen with Super and Alt). Bug 950160 however is about other programs not being able to bind Super+any key to a global action.

John Lea (johnlea) on 2012-11-27
description: updated
tags: added: udp
Changed in ayatana-design:
assignee: nobody → John Lea (johnlea)
importance: Undecided → High
Changed in compiz:
importance: Medium → High
Changed in compiz-core:
importance: Medium → High
Changed in compiz (Ubuntu):
importance: Medium → High
status: Confirmed → Triaged
Changed in compiz:
status: Confirmed → Triaged
Changed in compiz-core:
status: Confirmed → Triaged
Changed in ayatana-design:
status: New → Fix Committed
Mr. Blonde (mr.blonde) wrote :

My workaround for now is to install a minimal window manager like awesome and use that when I'm working with virtual machines (you can select your window manager from the login screen). It'll only need a few extra MB and that way you don't have to bother with bad workarounds in Unity.

Changed in compiz:
milestone: 0.9.9.0 → 0.9.9.2
Changed in compiz:
milestone: 0.9.9.2 → 0.9.10.0
Fabio Rafael Rosa (rafaelfdr) wrote :

I'm running raring, and this problem still happens with current version of unity.
Was the fix mentioned here already released ?
If not, where can I get it ?
I do like unity, but, this problem _really_ gets in my way

Steve Magoun (smagoun) wrote :

This issue still exists. The OEM is shipping a workaround. Due to lack of progress upstream and the workaround, we're closing the escalation. it would still be good to have the bug fixed upstream; it's frustrating in the general case.

Changed in oem-priority:
status: Confirmed → Won't Fix
Changed in compiz:
milestone: 0.9.10.0 → 0.9.10.2
MC Return (mc-return) on 2013-07-24
Changed in compiz:
milestone: 0.9.10.2 → 0.9.11.0
Oibaf (oibaf) on 2013-09-03
Changed in ayatana-design:
status: Fix Committed → Fix Released
John Lea (johnlea) on 2013-09-03
Changed in ayatana-design:
status: Fix Released → Fix Committed
dimovnike (dimovnike) wrote :

how can we test this? where do we download APK or install a repo?
Thanks.

pieterjanvu (pieterjanvu) wrote :

Is a fix being committed to any release? I've disabled the HUD shortcut key in Raring since install given this issue.

Péter Trombitás (trombipeti) wrote :

Will this pretty annoying issue ever be solved? Still experiencing it in 13.10 and 12.04 as well.

Alan Bell (alanbell) wrote :

based on the comment at #7 it almost certainly is going to remain broken in compiz - however with Mir the input handlers are utterly different so there might be an opportunity to have Ubuntu work with virtualisation and remote desktops without grabbing keys from the guest.

estanislao bulián (estani-b) wrote :

It drives my crazy, where is this fix? Can i download it from somewhere? I guess i'll be back to xubuntu sooner than excpected.

Julian Alarcon (alarconj) wrote :

Ok, is almost imposible to work with Remmina, VM managers and similars... Do you have any new about this?

Paul Howie (paulhowie) wrote :

It really looks like a fix is not coming for this. I've remapped the ubuntu menu key from "super" to "ctrl-super" in compizconfig-settings-manager so that I can use the windows key in my VMs without it triggering the overlay.

It's not ideal, but it's enough to allow me to get on with my work for now.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers