Skip to content

Instantly share code, notes, and snippets.

@mmrwoods
Created November 25, 2010 13:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mmrwoods/715390 to your computer and use it in GitHub Desktop.
Save mmrwoods/715390 to your computer and use it in GitHub Desktop.
Custom cocoa key bindings
/* save this file to ~/Library/KeyBindings/DefaultKeyBinding.dict */
/*
Prefixes for modifier keys...
------------------------------
~ Option key (⌥)
$ Shift key (⇧)
^ Control key (⌃)
@ Command key (⌘)
# keys on number pad
*/
{
/* home moves to the end of the line rather than the beginning of the document */
"\UF729" = "moveToBeginningOfLine:";
"$\UF729" = "moveToBeginningOfLineAndModifySelection:";
/* end moves to the end of the line rather than the end of the document */
"\UF72B" = "moveToEndOfLine:";
"$\UF72B" = "moveToEndOfLineAndModifySelection:";
/* page up and page down actually page up and down rather than scroll up and down */
"\UF72C" = "pageUp:";
"\UF72D" = "pageDown:";
/* shortcut to hash uses § symbol key */
"§" = ("insertText:", "#");
"~§" = ("insertText:", "§");
/* F13 duplicates backspace because I keep hitting it by accident */
"\UF710" = "deleteBackward:";
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment