How to hack HOME and END keys on MacOS to behave like on Windows

It’s really annoying that HOME and END on MacOS behaves differently than on Windows. If you want to remap all these keys, use tool called KeyRemap4MacBook.

Not working solution 😉

Here is simply way how to change it (copied from evansweb):

I have found a way to “fix” this problem by editing the default keybindings file,~/Library/KeyBindings/DefaultKeyBinding.dict. Create the directory and / or the file if they’re not already there, and make it look like this:

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

External source:–remap-the-home-and-end-keys

Leave a Reply

Your email address will not be published. Required fields are marked *