Home and End Keys

Home / End Key on Mac OS (OS X)

This is how I got Home and End keys working on Mac OS PC style.

Tested on Mac OS (10.12, 10.13, 10.14, 10.15)

Open the file ~/Library/KeyBindings/DefaultKeyBinding.dict

You may need to create the file if it doesn’t already exist, add the following for Home and End key:

  /* Home */
  "\UF729" = moveToBeginningOfLine:; // home
  "$\UF729" = moveToBeginningOfLineAndModifySelection:; // shift-home
  "^\UF729" = moveToBeginningOfDocument:; // ctrl-home
  "^$\UF729" = moveToBeginningOfDocumentAndModifySelection:; // ctrl-shift-home
  /* End */
  "\UF72B" = moveToEndOfLine:; // end
  "$\UF72B" = moveToEndOfLineAndModifySelection:; // shift-end
  "^$\UF72B" = moveToEndOfDocumentAndModifySelection:; // ctrl-shift-end
  "^\UF72B" = moveToEndOfDocument:; // ctrl-end

Once you have saved the file, you will need to logout current user and sign back in to check.

If this doesn’t work, you can install Karabiner, which basically maps the key on a kernel level and has a decent application to do a lot more than just running Home and End keys. Feel free to let us know in the comments section, if this doesn’t work for you.

Leave a Reply

Your email address will not be published. Required fields are marked *