Skip to content

Instantly share code, notes, and snippets.

@Belphemur
Created September 2, 2022 19:28
Show Gist options
  • Save Belphemur/5a45ce6826c609a65421cc10a1e607c1 to your computer and use it in GitHub Desktop.
Save Belphemur/5a45ce6826c609a65421cc10a1e607c1 to your computer and use it in GitHub Desktop.
DefaultKeyBinding.dict for MacOS to work like windows for Home/End and CTRL+Arrow functions
//source: https://damieng.com/blog/2015/04/24/make-home-end-keys-behave-like-windows-on-mac-os-x/
//Move DefaultKeyBinding.dict in your ~/Library/KeyBindings folder
//Log out log back in
{
"\UF729" = moveToBeginningOfParagraph:; // home
"\UF72B" = moveToEndOfParagraph:; // end
"$\UF729" = moveToBeginningOfParagraphAndModifySelection:; // shift-home
"$\UF72B" = moveToEndOfParagraphAndModifySelection:; // 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
"@\UF702" = moveWordLeft:; // cmd-left
"@$\UF702" = moveWordLeftAndModifySelection:; // cmd-shift-left
"@\UF703" = moveWordRight:; // cmd-right
"@$\UF703" = moveWordRightAndModifySelection:; // cmd-shift-right
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment