Unix Keybindings for GTK 2.x apps.

Create a file with he following contents at /usr/share/themes/Unix/gtk-2.0-key

# Standard Unix bindings for GtkTextView and GtkEntry
binding "gtk-unix-text-entry"
  bind "<ctrl>u" { "delete-from-cursor" (paragraph-ends, -1) }
  bind "<ctrl>h" { "delete-from-cursor" (chars, -1) }
  bind "<ctrl>w" { "delete-from-cursor" (word-ends, -1) }

class "GtkEntry" binding "gtk-unix-text-entry"
class "GtkTextView" binding "gtk-unix-text-entry"

Alternatively you can add this file in your equivalent $HOME/.themes sub-directory.

And then do:

% echo 'gtk-key-theme-name = "Unix"' > ~/.gtkrc-2.0

Or using gconf (yuck):

% gconftool-2 -s /desktop/gnome/interface/gtk_key_theme --type string "Unix"

Note: This used to work with old versions of GTK 2.x, I’m not sure if it still works, feedback welcome.