The Hawker Squawker
The art of writing is the art of discovering what you believe. -- Gustave Flaubert
Mac OS X Home/End key bindings [Permalink]
One thing that i absolutely cannot stand about the MAC is the non-standard behavior of the home and end keys. Every other OS i've ever used, when you press Home, it takes you to the beginning of the line, and when you press End, it takes you to the end of the line. If shift is pressed, it highlights to the beginning or end from your current location.

This page tells how to get that behavior in most OS X applications. The long and short of it is this:

Create (or edit) the following file:

~/Library/KeyBindings/DefaultKeyBinding.dict

Add the following to the file:

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

One notable application that does NOT respect the KeyBindings is Eclipse. Fortunately, Eclipse has its own mechanism for changing KeyBindings. Go to the preferences -> General -> Keys, and then change the Start, End, Select Line End, and Select Line Start mappings to be what you want.

Happy typing!

Posted by shawker on Wednesday, 14 May 2008
Tags:
Enter Comment

All comments are moderated

Your comment:


(not displayed)



 
 
 

Live Comment Preview: