Sunday, May 29, 2016

Make MAC OSX 'Home' and 'End' keys move the cursor to the beginning or end of lines.

When transitioning from a Windows-centric life to that of a Mac. There is a lot to get used to, and most of the differences are worth persevering with, when you get used to them, life is good. However, the fact that the HOME and END buttons move the cursor to the beginning and end of a document instead of the beginning and end of a line is WEIRD.

To fix that, navigate to:

/Users/UserName/Library/KeyBindings

Create a text file named DefaultKeyBinding.dict

and copy this into it:
{
    "\UF729"  = moveToBeginningOfLine:; // home
    "\UF72B"  = moveToEndOfLine:; // end
    "$\UF729" = moveToBeginningOfLineAndModifySelection:; // shift-home
    "$\UF72B" = moveToEndOfLineAndModifySelection:; // shift-end
}

Note, if the file already exists then add the relevant lines between the braces.

Cheers!

1 comment:

  1. This post is good enough to make somebody understand this amazing thing, and I’m sure everyone will appreciate this interesting things.
    James

    ReplyDelete