Create custom keybindings

Sep 06, '12 07:30:00AM

Contributed by: arnstein

If you'd like to easily type some non-standard glyphs, adding a custom keybinding might prove useful.

The keybindings file is located in ~/Library/KeyBindings/ (You will probably have to make this directory and then add a file named "DefaultKeyBinding.dict".]).

The syntax for these keybindings are:

"[keycombination]" = ("insertText:", "\[unicodenumber or actual character]");
Example:
"~*" = ("insertText:", "\U0215"); /* the times-symbol "×" */
In this "Keycombination" field:
@ = cmd key
$ = shift key
~ = option key
^ = ctrl key
# = keys on number pad

More on the keybinding syntax at http://xahlee.info/kbd/osx_keybinding_key_syntax.html.

[kirkmc adds: We've also got a 2006 hint that goes into some detail about similar keybindings.]

Comments (3)


Mac OS X Hints
http://hints.macworld.com/article.php?story=20120822010316876