GNOME Bugzilla – Bug 738801
Menus steal keybindings
Last modified: 2014-10-20 06:21:19 UTC
As of GTK 3.14, when a menu has been opened (either via a button or via the menu bar), all keyboard events seem to be eaten up by GTK, even when they’re not bound within the application. I have Hyper+$key and Super+$key bound within my shell. When I have a GTK 3.14 menu open, though, these events don’t trigger anymore until the menu has been closed manually.
Some other widgets also seem to do this. E. g., the text box in Nautilus’ file search. Though I’ve not yet observed the text box issue across other applications (the menu bug appeared in all GTK applications thus far).
very likely, fall out from the gesture support landing — the grab that menus already hold is a bit too eager. adding Carlos to the CC.
This has always been the case - menus grab the keyboard. I don't think anything changed here with gestures.
mmh, I tried with Firefox and I could call `Super + H` to minimize it, even with a menu open, but Firefox is special in using GTK+ 2.x. I tried with a GTK+ 2.x app, and indeed I couldn't get `Super + H` through, so yep: no regression. @Tobias: that's how GTK+ menus work with regards to key input, and there's nothing we can do about it. *** This bug has been marked as a duplicate of bug 100903 ***
In the duplicate, it lists a rationale which doensn’t quite make sense, though: > GTK has to grab the pointer and the keyboard when it maps an > override-redirect window like a menu or a combo box dropdown. > Otherwise users could e.g. switch desktops using WM > keybindings which is very annoying Grabbing all input just for that seems a bit overkill. For the menus this might be a minor (though disruptive) issue; how about the text input in the Nautilus search box though? Is this a widget issue or shall I file something against Nautilus? So far it didn’t appear in other applications, but I don’t know whether it’s a special widget or something. Reopening for advice on the Nautilus issue.
I tried reproducing, and it seems I must’ve accidentally had caps lock on when in the Nautilus search box, so that’s why the bindings didn’t fire. I’d still be interested in exactly why the menus have to grab everything, though. The popover menus don’t do that either. *** This bug has been marked as a duplicate of bug 100903 ***