Skip to content

Instantly share code, notes, and snippets.

@jahio
Created September 6, 2013 03:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save jahio/6459270 to your computer and use it in GitHub Desktop.
Save jahio/6459270 to your computer and use it in GitHub Desktop.
/* Remaps the OS X home and end keys on your keyboard to go to the beginning,
and end of the line respectively. Emulates Windows behavior - one of the
few things about Windows I actually liked back in the day.
Put this file in ~/Library/KeyBindings/DefaultKeyBinding.dict. Create the
directory under ~/Library if it doesn't yet exist (~/Library should). Then
put this file in there. Rememebr to re-launch and program/process that you
want to be able to use the new keymaps in. Or just logout and log back in,
or you could reboot but that might be a little overkill.
Tested on Mac OS X 10.8 Mountain Lion. May or may not work with 10.9 Mavericks.
*/
{
"\UF729" = "moveToBeginningOfLine:"; // Home
"\UF72B" = "moveToEndOfLine:"; // End
"$\UF729" = "moveToBeginningOfLineAndModifySelection:"; // Shift+Home Highlight
"$\UF72B" = "moveToEndOfLineAndModifySelection:"; // Shift+End Highlight
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment