Fix input box keybindings in Firefox

Jun 29, 2011 · firefox

[ Note that I am in the process of migrating these blog posts from Wordpress, and as such it may contain incorrect formatting, missing links, etc. My old site is available at http://www-old.perkin.org.uk/ so if you find something obviously broken please let me know. Thanks! ]

Those of us used to command line editing will no doubt have been frustrated many times in Firefox when editing text in an input box and subconciously hitting ctrl-w to delete-word, only to have the tab close and your work deleted.

Thankfully there is a workaround to this. It used to be a case of adding the following to .gtkrc:

gtk-key-theme-name = "Emacs"

However these days it’s a gconf setting:

$ gconftool-2 --set /desktop/gnome/interface/gtk_key_theme Emacs --type string

This will bind ctrl-w to delete-word when in an input box, but retain the close tab binding elsewhere, a nice implementation of DWIM. See this page for more information.


All blog posts

Feb 20, 2012 » New blog design
Jan 11, 2012 » Set up anonymous FTP upload on Oracle Linux
Jan 09, 2012 » Kickstart Oracle Linux in VirtualBox
Jan 09, 2012 » Kickstart Oracle Linux from Ubuntu
Dec 22, 2011 » Last day at MySQL
Dec 15, 2011 » Installing OpenBSD with softraid
Sep 21, 2011 » Create VirtualBox VM from the command line
Sep 14, 2011 » Creating chroots for fun and MySQL testing
Jun 30, 2011 » Graphing memory usage during an MTR run
Jun 29, 2011 » Fix input box keybindings in Firefox
Jun 24, 2011 » How to lose weight
Jun 23, 2011 » How to fix stdio buffering
Jun 13, 2011 » Serving multiple DNS search domains in IOS DHCP
Jun 13, 2011 » Fix Firefox URL double click behaviour
Apr 20, 2011 » SSH via HTTP proxy in OSX
Nov 09, 2010 » How to build MySQL releases
Apr 29, 2010 » 'apt-get' and 5,000 packages for Solaris10/x86
Sep 16, 2009 » ZFS+NFS vs OSX
Sep 12, 2009 » pkgsrc on Solaris
Dec 09, 2008 » Jumpstart from OSX