MozillaZine

Talk:Emacs Keybindings - Firefox

From MozillaZine Knowledge Base

Note: (2004-11-18/Firefox v.1.0) as of version 1.0, even the gconf-editor trick doesn't seem to work. Any other ideas?

It would be nice if keybindings were completely configurable on a per-user basis.

Didn't firefox used to have the emacs keybind option? Maybe keybindings could go under a "Very Advanced" tab from inside advanced.


Added 2005-08-01: I've just upgraded to Thunderbird version 1.0 (20041207), and no longer have emacs keybindings. I tried editing /usr/local/mozilla/res/builtin/platformHTMLBindings.xml, but that didn't work. Is it possible to retrieve the emacs keybindings? (From: Ted Catchpole, e.catchpole@adfa.edu.au)

C-u intricacies

Obviously, what I'm expecting when I hit ctrl-u is for the text on the current line before my cursor to be deleted. However, the emacs-GTK binding for ctrl-u is to delete the entire line, regardless of cursor position. So, I added the following to my gtkrc-2.0 after my gtk-key-theme-name = "Emacs" line...

binding "gtk-u-clear-text-entry"
{
    bind "<ctrl>u" { "delete-from-cursor" (paragraph-ends, -1) }
}
class "GtkEntry" binding "gtk-u-clear-text-entry"
class "GtkTextView" binding "gtk-u-clear-text-entry"

Which seems to work (tested using 'zenity --entry'), except Firefox continues to clear the entire line. I'm guessing Firefox uses a subclass or has something hardcoded to prevent my bindings from applying, but I know sfa about GTK - anyone know what's going on?

Also, the File/Bookmarks menus interfere with the alt-f/alt-b (forward/back words) bindings. Is there a way around that? -sqweek 00:29, 30 August 2005 (PDT)

Fedora Core & Java Archive Utility

There does not seem to be a package within FC3 or FC4 that contains /usr/bin/jar (see this RPMFind search for /usr/bin/jar - it was removed after FC2). AFAIK, all jar does is [pk]zip the files ... seems to do the trick, but the compression doesn't look right in the resulting jar file; 352KiB in place of the 1.3MiB it was originally. I suspect there may be a weird incompatibility on some systems (perhaps windows users? or some other system that doesn't use the same compression libraries?), but it works just fine for me on Fedora Core 4. I've taken the liberty of adding this note to the article (and wiki-fying the code). --Adam Katz 09:14, 14 October 2005 (PDT)

.gtkrc-2.0 versus GConf

(These notes were in the article but probably don't belong there as they are more of a meta nature.) Hackerb9 20:28, 12 January 2007 (UTC)

  1. It's unclear when one method or the other should be used.
  2. Personally I use both methods. That way it'll work no matter what window manager.
  3. Running Gnome 2.8 under FC3 I found that under gconf-editor the gtk_key_theme was already set to Emacs, yet Firefox wasn't using the Emacs bindings. I edited .gtkrc-2.0 as indicated and then it started working. On another FC3 system I found that setting .gtkrc-2.0 as above didn't do the trick, I had to use gconf-editor as well. YMMV.
  4. Older versions of Gnome (< 2.8) happily used the .gtkrc-2.0. Could it be a Gnome bug that this no longer works?