keyboard shortcuts do not work when a menu is open

Bug #32860 reported by Jonathon Conte on 2006-02-25
This bug affects 3 people
Affects Status Importance Assigned to Milestone
In Progress
gtk+2.0 (Ubuntu)
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.

Sitsofe Wheeler (sitsofe) wrote :

This looks like a dup of . Apparently this is an implementation issue and given what Sebastien Bacher said I suspect this report will be marked similarly...

Sitsofe Wheeler (sitsofe) wrote :

However it is also similar to which is assigned...

kko (kko) wrote :

For the same issue in KDE please see bug 45846.

sam tygier (samtygier) wrote :

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

Changed in gtk+2.0:
status: Unconfirmed → Confirmed
B Paulson (b-r-p) wrote :

This bug also affects 6.10 (Edgy) on i386.

Changed in gtk:
status: Unknown → In Progress
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?

JaumeFigueras (jaume-figueras) wrote :

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

David Balažic (xerces8) wrote :

Same in 7.10 (gutsy)

Marcus Sundman (sundman) wrote :

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

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
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...

giovani (wejick-gmail) wrote :

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

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.

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():

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

Charles Huber (genpfault) wrote :

Also, I'm pretty sure this is a duplicate of #10905:

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  Edit
Everyone can see this information.

Other bug subscribers

Remote bug watches

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