Multi-stroke key bindings, Extended vi Edition

2008-02-21 23:42:59 UTC

As some of you know, I use the multi-stroke key bindings by Jacob Rus to easily type strings such as ⌃⇧⌘⌫. I mostly use these characters in three places:

  1. Correspondence with users
  2. Posts here
  3. Documentation

And it sure beats looking those characters up in UnicodeChecker or the Character Palette.

But I was never satisfied with the original set of key bindings that that file provides. The first problem that I had was that the arrow keys are emacs keys, not vi keys:

Solid Left (back)⌃M + ⌃B
Solid Right (forward)⌃M + ⌃F
Solid Up (previous)⌃M + ⌃P
Solid Down (next)⌃M + ⌃N
Dotted Left (back)⌃M + B
Dotted Right (forward)⌃M + F
Dotted Up (previous)⌃M + P
Dotted Down (next)⌃M + N

I'm a vi guy, so I wanted the hjkl arrangement for my arrows. So that was the first change I made.

I also added a bunch of characters, and reassigned some of them:

Additions:
ChDescriptionKey sequence
Return^M + Return
Command^M + C
Command (Apple)^M + ^A
Option^M + ^O
Control^M + ^C
Shift^M + ^S
Caps Lock^M + ^S
Smiling face^M + ^F
Frowning face^M + F
×Multiplication sign^M + ^X
Modifications:
ChDescriptionKey sequenceReason for modification
The arrows (solid and dotted), as noted aboveBecause I prefer vi to emacs
Return^M + ^RTo free up ^E for Escape
Enter^M + RTo free up E for Eject
Home^M + Shift-^HTo free up ^H for ←
End^M + Shift-^ETo free up H for ⇠
Escape^M + ^ETo free up ^X for × (multiplication sign)
Eject^M + ETo keep Eject on the same key as Escape

In case you're wondering about the division sign (÷): The OS already provides this as ⌥/, and always has been (all the way back to 1984). I didn't need to add it.

Also, in case you're wondering about “Apple” above: The Apple logo is ⇧⌥K, so I didn't need to add that, either. (Plus, I never use it.)

File: DefaultKeyBinding.dict.bz2

This file contains all of the above bindings, as well as the ones from Jacob Rus' original that I didn't change.

To install it, put it in the KeyBindings folder in the Library folder in your Home folder. You may need to create the folder. The bindings are loaded on application launch by Cocoa, so you will need to relaunch any already-running applications in order to use the bindings in them.

Leave a Reply

Do not delete the second sentence.