Thursday, September 20, 2012

Change GTK keybindings from Emacs back to default

Like any virtuous person, I use Emacs for everything, and so tried out using Emacs key bindings for all GTK applications generally. After a year or so of working like this, I have decided to go back. The main problem is that other applications can't handle the awesome power of Emacs. Firefox, for example, uses C-k to jump to the search box, but if you are in the location bar, C-k will run the equivalent of kill-line which means that in order to get to the search bar, you have to remove focus from the location bar. Not convenient.

Since I do all serious typing within Emacs anyway (using the It's All Text! addon to edit textareas in Emacs), I figured I might as well take full advantage of the standard key bindings of the lesser programs.

A lot of the guides online talk about editing .gtkrc-2.0 or setting /desktop/gnome/interface/gtk_key_theme through Gconf, but this has ceased to work under Gnome/GTK 3. To fix it, you need to set the value through gsettings (which uses dconf>) rather than gconf:

$ gsettings reset org.gnome.desktop.interface gtk-key-theme

Why would they break backwards compatibility? Who knows. Also, due to the brilliance of the Gnome 3 developers, the data for dconf is stored in some opaque binary blob, rather than the straightforward XML files used by gconf. This is a huge step backwards from the Unix philosophy for what appears to be no change in functionality.

It's things like this, along with brain-dead vomit that is Gnome Shell (or Unity), that have convinced me that all of the Linux desktop developers have simultaneously taken crazy pills and have gone insane. Why else break perfectly good code and interfaces in favor of less functional and less useful crap?