On macOS, this changes the Home
and End
keys on a keyboard to go to the beginning and end of the current line. This is when editing text in all applications (e.g., in any text editor and in a text edit box within Safari).
Working on macOS Catalina 10.15.6 (19G73). So far, it's working in:
- SourceTree
- Sublime
- Visual Studio Code
- Safari
- MS Teams
Bits and pieces were gathered from:
- https://damieng.com/blog/2015/04/24/make-home-end-keys-behave-like-windows-on-mac-os-x
- comments from other users on that post
Put DefaultKeyBinding.dict
inside ~/Library/KeyBindings
- you may have to create the folder
- may also need to change the owner to you
chown <your-username> ~/Library/KeyBindings
- may also need to allow access
chmod 777 ~/Library/KeyBindings
Also may need to allow permissions to the file itself
chmod 777 ~/Library/KeyBindings/DefaultKeyBinding.dict
{
"^$\UF729" = moveToBeginningOfDocumentAndModifySelection:; //ctl-end
"^\UF72B" = moveToEndOfDocument:; //ctl-end
"@\UF72B" = moveToEndOfDocument:; //cmd-end
}