How to Reassign Home and End Keys on a Mac

Raimonds VilumsRaimonds Vilums
1 min read

As I transition from Windows to Mac, I am used to the Home and End keys moving the cursor to the beginning and end of a line, rather than the document, as is the default on Mac. While I am willing to relearn most shortcuts on Mac, I have decided to retain these particular shortcuts.

  1. Create a KeyBindings folder in the Library folder if it doesn’t exist

  2. Create a file DefaultKeyBinding.dict

  3. Enter the content:

{
    "\UF729"  = "moveToBeginningOfLine:";
    "\UF72B"  = "moveToEndOfLine:";
    "$\UF729" = "moveToBeginningOfLineAndModifySelection:";
    "$\UF72B" = "moveToEndOfLineAndModifySelection:";
}
  1. Logout and login
0
Subscribe to my newsletter

Read articles from Raimonds Vilums directly inside your inbox. Subscribe to the newsletter, and don't miss out.

Written by

Raimonds Vilums
Raimonds Vilums