Skip to content

Instantly share code, notes, and snippets.

@miromannino
Created August 22, 2016 09:07
Show Gist options
  • Save miromannino/8bb414e78624992db97d0aa270fd6c4f to your computer and use it in GitHub Desktop.
Save miromannino/8bb414e78624992db97d0aa270fd6c4f to your computer and use it in GitHub Desktop.
Home End Keys in Apple keyboard
One option is to create ~/Library/KeyBindings/ and save a property list like this as ~/Library/KeyBindings/DefaultKeyBinding.dict:
{
"\UF729" = moveToBeginningOfLine:;
"\UF72B" = moveToEndOfLine:;
"$\UF729" = moveToBeginningOfLineAndModifySelection:;
"$\UF72B" = moveToEndOfLineAndModifySelection:;
}
Quit and reopen applications to apply the changes. Note that DefaultKeyBinding.dict is not supported by some applications like Xcode or Firefox.
In Terminal you can assign from Preferences > Settings > Keyboard:
home (↖) to control-a, expressed with the following characters: \033[H
end (↘) to control-e, expressed with the following characters: \033[F
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment