I wanted my Home and End keys to behave as they do in Windows. I found a nice solution here and thought I would update with the recomended changes for modern OS versions.
- If not present, create directory
~/Library/KeyBindings
. - Create file
~/Library/KeyBindings/DefaultKeyBinding.dict
3. Paste the following contents:
{
"\UF729" = moveToBeginningOfLine:; // home
"\UF72B" = moveToEndOfLine:; // end
"$\UF729" = moveToBeginningOfLineAndModifySelection:; // shift-home
"$\UF72B" = moveToEndOfLineAndModifySelection:; // shift-end
"^\UF729" = moveToBeginningOfDocument:; // ctrl-home
"^\UF72B" = moveToEndOfDocument:; // ctrl-end
"^$\UF729" = moveToBeginningOfDocumentAndModifySelection:; // ctrl-shift-home
"^$\UF72B" = moveToEndOfDocumentAndModifySelection:; // ctrl-shift-end
”^\UF702” = (moveWordLeft:); // ctrl-left
“^$\UF702” = (moveWordLeftAndModifySelection:); // ctrl-shift-left
“^\UF703” = (moveWordRight:); // ctrl-right
“^$\UF703” = (moveWordRightAndModifySelection:); // ctrl-shift-right
}
- Run
killall Finder
to implement changes.