Multi-stroke Key Bindings
A year ago I wrote about key bindings for switchers explaining how to make home/end and page up/down work (system wide) as most Windows users expect them to work.
Using the same key binding system we can make insertion of the various Apple-centric keyboard glyphs easy. This is useful when we want to cite a keyboard sequence like ⇧⌘V or similar.
If you look in the HTML bundle there is an Entities submenu (depicted below.) This is what I used when writing the TextMate manual, i.e. typing command
and pressing tab (⇥) to get ⌘ etc.
This is fine when we are inside TextMate and writing HTML/Markdown, but when you are getting used to having the key glyphs available, the need for them tend to creep up in other applications as well.
Jacob Rus got the great idea to create a multi-stroke key binding dictionary for inserting these glyphs. The problem would normally be that there are dozens of these glyphs, and we do not have dozens of free key equivalents, but by using multi-stroke key bindings we can hide all of them behind ⌃M.
The format for multi-stroke key bindings is explained here so without further ado here is a key binding dictionary for most Apple-centric glyphs. Credits to Jacob Rus for compiling the dictionary.
You need to save the paste as ~/Library/KeyBindings/DefaultKeyBinding.dict
and then relaunch the applications for which you want this to work. If you already have a local key binding file, you need to add the bindings to this, rather than overwrite it.
Note: Key bindings only work for Cocoa applications.
Below is a table of the glyphs and their key sequence using this key binding dictionary. The logic behind the arrow glyphs is that they follow the default (emacs inspired) movement keys, i.e. forward, backward, next (down), previous (up.) As for the other glyphs, they mostly use the first letter of the glyph name, and control (⌃) is used for the “primary” glyph on that key.
Glyph | Description | Key Sequence |
---|---|---|
␣ | Space | ⌃M + ⌃␣ |
↩ | Return | ⌃M + ⌃E |
⌅ | Enter | ⌃M + E |
⇥ | Tab | ⌃M + ⌃T |
⇤ | Backtab | ⌃M + T |
⌫ | Delete | ⌃M + ⌃D |
⌦ | Forward Delete | ⌃M + D |
⌘ | Command (apple) | ⌃M + ⌃A |
⌥ | Option | ⌃M + ⌃O |
⌃ | Control | ⌃M + ⌃C |
⇧ | Shift | ⌃M + ⌃S |
⇪ | Caps Lock | ⌃M + S |
← | 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 |
↖ | Home | ⌃M + ⌃H |
↘ | End | ⌃M + H |
⇞ | Page Up | ⌃M + ⌃U |
⇟ | Page Down | ⌃M + U |
⎋ | Escape | ⌃M + ⌃X |
⏏ | Eject | ⌃M + X |