GNOME Bugzilla – Bug 100636
emacs movement keys don't work in location bar with mozilla 1.2b with gtk2
Last modified: 2004-12-22 21:47:04 UTC
With mozilla-1.2b and galeon-1.3.0 installed, CTRL-{A,E,U,W} and ALT-{B,F}, etc. do not work in the location bar. Instead, these sequences get sent to the main window. This has also been verified with mozilla-1.2.1.
The various keys are most likely being intercepted because they are shortcuts for some menuitems. This is just how bonobo works. And since HIG states Ctrl-A is Select All, it's obviously conflicting. The whole emacs keybinding issue needs to be resolved in more general level.
*** Bug 105699 has been marked as a duplicate of this bug. ***
*** Bug 109164 has been marked as a duplicate of this bug. ***
*** Bug 110909 has been marked as a duplicate of this bug. ***
Another issue is reported in debian bug #189357: I use emacs keybinding with gtk+2. Keybindings CTRL+U and CTRL+K work ok, but CTRL-W doesn't because association with "close" action of file menu takes precedence. Instead it should work as in mozilla, where CTRL-W in text-box delete previous word and out of text-box close tab.
*** Bug 109742 has been marked as a duplicate of this bug. ***
*** Bug 112379 has been marked as a duplicate of this bug. ***
*** Bug 118466 has been marked as a duplicate of this bug. ***
This, one hopes will be solved when I rip and out and replace the menu system, so I'm taking this.
Apologies for spam... marking as GNOMEVER2.3 so it appears on the official GNOME bug list :)
removing the GNOMEVER, cuz we are not an official module
*** Bug 119925 has been marked as a duplicate of this bug. ***
> This, one hopes will be solved when I rip and out and replace the menu > system, so I'm taking this. I wouldn't count on that, epiphany has exactly the same problems that we do :( Interestingly the key bindings work when the autocompletion drop-down is open.
I ought to mention here that this has been considered "to be a world of pain to set up with [gtk] 2.2" One could hope we'd have better luck with 2.4 or 2.6. The reason it's working with the autocompletion window open could be that the window grabs the cursor.
We now have a viable workaround which I have implemented and checked in. We override the key_press_event "virtual method" from GtkWidget instead of attaching a callback to the key_press signal. This allows us to see the events before the stupid Accel code eats them. So, we check if the key code could possibly be an emacs code (anything modifed with ctrl or alt) and then pass it straight on to the GtkEntry if the GtkEntry is focused. We then return immediately if the GtkEntry processed the code or otherwise we let the original key_press_event handler have a go which will let the accel code respond to it if needed. It's not particularly inelegant but highly offensive in principle that Gtk forces us to do something as silly as this.
In 1.3.11a(Debian) ctrl-U in the location bar opens "View Source" instead of clearing the location bar.
This should be working fine in 1.3.11a if the Emacs key theme is enabled. It has been altered again in 1.3.12, and further altered since then. This really is fixed.