Global emacs-like keybindings in linux

3

2

I'm trying to emulate behaviour I get from KeyRemap4MacBook on Mac OS X. It lets me remap control-m to Enter, for instance, globally.

Is this possible with X/GNOME? Seems like xmodmap is not suitable for remapping key combinations. I tried xbindkeys to bind control-m to xdotool key Return, but it emits control-return. I tried xdotool keyup control; xdotool key Return; xdotool keydown control but it stills behaves unpredictably.

Any ideas? Kernel level hacks?

MichaƂ Bendowski

Posted 2011-07-16T15:51:38.927

Reputation: 173

Answers

2

Emacs keybindings for gtk apps

echo 'gtk-key-theme-name = "Emacs"' >>~/.gtkrc-2.0
gconftool -t string --set /desktop/gnome/interface/gtk_key_theme Emacs

taken from here http://johan.kiviniemi.name/blag/emacs-key-bindings-in-gtk-apps/

For global keybindings check out the Emacs Wiki http://www.emacswiki.org/emacs/XModMap and as an Arch Linux user I recommend checking out https://wiki.archlinux.org/index.php/Xmodmap

Marcus Maxwell

Posted 2011-07-16T15:51:38.927

Reputation: 526