Skip to content

Instantly share code, notes, and snippets.

@michaelabon
Created September 28, 2011 18:22
Show Gist options
  • Save michaelabon/1248764 to your computer and use it in GitHub Desktop.
Save michaelabon/1248764 to your computer and use it in GitHub Desktop.
Map [End] to mean "End of Line" in Mac OS X
{
/* Remap Home / End to be correct :-) */
"\UF729" = "moveToBeginningOfLine:"; /* Home */
"\UF72B" = "moveToEndOfLine:"; /* End */
"$\UF729" = "moveToBeginningOfLineAndModifySelection:"; /* Shift + Home */
"$\UF72B" = "moveToEndOfLineAndModifySelection:"; /* Shift + End */
}
@michaelabon
Copy link
Author

I have found a way to "fix" this problem by editing the default keybindings file, ~/Library/KeyBindings/DefaultKeyBinding.dict. Create the directory and / or the file if they're not already there, and make it look like the above. If there are already entries in DefaultKeyBinding.dict, just add the 4 new mappings above to the main section of your file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment