keyboard shortcuts do not work when a menu is open

Bug #32860 reported by Jonathon Conte
46
This bug affects 3 people
Affects Status Importance Assigned to Milestone
GTK+
In Progress
Unknown
gtk+2.0 (Ubuntu)
Triaged
Medium
Ubuntu Desktop Bugs
Declined for Hardy by Steve Langasek
Declined for Intrepid by Steve Langasek

Bug Description

I'm running the i386 flavor of Ubuntu Dapper Drake testing (Flight 4 + updates).

The problem is that keyboard events are not passed correctly when a menu is open. I'm not sure whether the problem is within GTK+, metacity or perhaps another component. This bug can be duplicated by clicking on a menu to open it (either one on the panel or one in an application) and then trying to use a keyboard shortcut (F1, ALT+F2, Print Screen, etc.) while the menu is still open. The result is that the keyboard shortcut is not acknowledged by the desktop. This causes problems like not being able to take a screenshot of the menu, for example. It also makes the desktop behave in an inconsistent and unresponsive way because the keyboard shortcuts only work in a specific context.

I propose that keyboard input should always be grabbed and processed to check to see if the user has attempted to use a keyboard shortcut before that keyboard input is passed to the widget currently in focus be it a menu or anything else. GNOME keyboard shortcuts should always take precedence and should not be modal.

Revision history for this message
Sitsofe Wheeler (sitsofe) wrote :

This looks like a dup of http://bugzilla.gnome.org/show_bug.cgi?id=308516 . Apparently this is an implementation issue and given what Sebastien Bacher said I suspect this report will be marked similarly...

Revision history for this message
Sitsofe Wheeler (sitsofe) wrote :

However it is also similar to http://bugzilla.gnome.org/show_bug.cgi?id=144907 which is assigned...

Revision history for this message
kko (kko) wrote :

For the same issue in KDE please see bug 45846.

Revision history for this message
sam tygier (samtygier) wrote :

oops, its not just the panel menu, its all menus in applications

Changed in gtk+2.0:
status: Unconfirmed → Confirmed
Revision history for this message
B Paulson (b-r-p) wrote :

This bug also affects 6.10 (Edgy) on i386.

Changed in gtk:
status: Unknown → In Progress
Revision history for this message
livingtarget (renekok) wrote :

And Feisty, why is this upstream bug dated 2004 and still no work has been done on it? People just mark it as duplicate and forget about it?

Revision history for this message
JaumeFigueras (jaume-figueras) wrote :

Not only for menus, it doesn't work with a combo box also. :(
Ubuntu Feisty.

Revision history for this message
David Balažic (xerces8) wrote :

Same in 7.10 (gutsy)

Revision history for this message
Marcus Sundman (sundman) wrote :

Special buttons, such as volume up/down/mute, also don't work when a menu is open.

Revision history for this message
Fred (eldmannen+launchpad) wrote :

I have this problem too!

I use Hardy Heron 8.04 alpha!

Changed in gtk+2.0:
assignee: nobody → desktop-bugs
status: Confirmed → Triaged
Revision history for this message
Miguel Diago (mdm) wrote :

This is still present in Hardy final.

As a workaround to take a screenshot you can use "gnome-screenshot --delay=<delay>" in a terminal...

Revision history for this message
giovani (wejick-gmail) wrote :

This is still present on interpid final.
I cant use printscreen button when a menu is open.

Revision history for this message
nicholas (nicholas-alipaz) wrote :

I just had the exact same issue as giovani. I can't use print screen. Additionally, one of my mousebuttons sends a keystroke (for search) and I binded that stroke to middle click, that won't come through either. I assume because the keystroke for search is not being caught.

Revision history for this message
Charles Huber (genpfault) wrote :

If you're willing to deal with a semi-tight polling loop (10-250ms I'd guess) you could use XQueryKeymap():
http://ubuntuforums.org/showpost.php?p=2901208

This seems to bypass XGrabKeyboard() pretty well in my testing.

Revision history for this message
Charles Huber (genpfault) wrote :

Also, I'm pretty sure this is a duplicate of #10905:
https://bugs.launchpad.net/ubuntu/+source/gtk+2.0/+bug/10905

Revision history for this message
Michael Nagel (nailor) wrote :

it is and these bugs should be merged...

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

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.