Skip to content

Files

Latest commit

c294a8f · Oct 11, 2017

History

History
34 lines (26 loc) · 887 Bytes

remap-home-and-end-keys.md

File metadata and controls

34 lines (26 loc) · 887 Bytes

Remap the Home and End Keys

For Non-Terminal Apps

Create the directory/file if not already there: ~/Library/KeyBindings/DefaultKeyBinding.dict

{
/* Remap Home / End to be correct :-) */
"\UF729"  = "moveToBeginningOfLine:";                   /* Home         */
"\UF72B"  = "moveToEndOfLine:";                         /* End          */
"$\UF729" = "moveToBeginningOfLineAndModifySelection:"; /* Shift + Home */
"$\UF72B" = "moveToEndOfLineAndModifySelection:";       /* Shift + End  */
}

For Terminal

Set the following in the keyboard preferences for the Terminal:

    home :: \033OH
    end :: \033OF
    F1 :: \033[11~
    F2 :: \033[12~
    F3 :: \033[13~
    F4 :: \033[14~

Sources