Skip to content

Instantly share code, notes, and snippets.

@benmaier
Created January 19, 2025 10:50
Show Gist options
  • Select an option

  • Save benmaier/00af8422481d20568e1d8e6d72451e67 to your computer and use it in GitHub Desktop.

Select an option

Save benmaier/00af8422481d20568e1d8e6d72451e67 to your computer and use it in GitHub Desktop.
FN key bindings macOS Home/End, PgUp, PgDn

put this in ~/Library/KeyBindings/DefaultKeyBinding.dict:

{
    "\UF729" = "moveToBeginningOfLine:";
    "\UF72B" = "moveToEndOfLine:";
    "$\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
    "\UF704" = "moveUp:"; // fn-up arrow
    "\UF705" = "moveDown:"; // fn-down arrow
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment