System-wide ErgoEmacs Keybinding for Windows, Mac, Bash

Perm url with updates: http://xahlee.org/emacs/ergonomic_emacs_keybinding_system-wide.html

System-wide ErgoEmacs Keybinding for Windows, Mac, Bash

Xah Lee, 2010-08-22, 2010-10-17, 2011-01-10

This page lists several utilities that let you use the ErgoEmacs Keybinding system-wide.

Windows

For Windows, just download the following executables.

Caps Lock for M-x (execute-extended-command)

Here's some util for Windows to make Caps Lock key do emacs's “M-x”. Very convenient.

Mac

Download one of the following file, then copy the content and put it in 〔~/Library/KeyBindings/DefaultKeyBinding.dict〕.

These are based on OS X's system-wide keybinding mechanism. For detail, see: Creating Keyboard Layout in Mac OS X.

Bash

Download the following, then place the content in your “.inputrc”. (see the header for detail.)

Not Perfect

I use all of them, the Dvorak version. However, note that there are many quirks in keybinding system in both Windows and Mac, as well as in Bash. In a perfect world, a keybinding system should let you assign or remap any key system-wide. However, that's not the case. Not in Windows, not in Mac OS X, not with emacs, nor with AutoHotkey. Typically, there are certain key combinations handled at low level that you just cannot remap, some are by design, but some seems not. (e.g. on Windows, 【Win+l】, 【Win+u】, 【Ctrl+Alt+Del】. On Mac, Opt with any of e u i n `, or Cmd with any of z x c v.)

Also, there are many practical quirks. For example, on Windows with AutoHotkey, the keys won't work when you are intsalling a software or in regedit. Because, while in regedit, you are running it in admin privilege mode. But ahk is not running in admin privilege mode.

On the Mac, the system wide keybinding works only with apps written in the Cocoa framework, but even so not all your key remappings are supported by Cocoa apps. (for practical purposes, it works in vast majority of apps out there.)

So, the above ErgoEmacs scripts are not perfect, but they cover all the basic cursor movement and deletion keys. (read the header file for any detail.)

PS the contributors for these scripts are in the files. Here's a summary:

  • Milan Santosi wrote the AutoHotkey scripts for Windows.
  • I wrote the keybinding config files for OS X.
  • Brendan Miller wrote the “.inputrc” config files for bash.

Popular posts from this blog

11 Years of Writing About Emacs

does md5 creates more randomness?

Google Code shutting down, future of ErgoEmacs