I found this helpful hint in the Slashdot comment area this evening and I wanted to pass it along. I would like to be able to give credit to the creator, but I don’t know his or her name. Whoever you are, thanks.
The home and end keys behave differently in Mac OS X than they do Windows. In Windows, to go to the beginning of a line, you press home, and to go to the end, you press end. In OS X, you go to the beginning of the line by pressing command-left arrow, and the end of the line with command-right arrow.
To change the Mac’s home and end keys to behave like Windows, create a text file named ~/Library/KeyBindings/DefaultKeyBinding.dict (if the folder doesn’t exist, go ahead and create it) and add these lines:
/* Home/End keys like Windows */
{
"\UF729" = "moveToBeginningOfLine:"; /* home */
"\UF72B" = "moveToEndOfLine:"; /* end */
"$\UF729" = "moveToBeginningOfLineAndModifySelection:"; /* shift + home */
"$\UF72B" = "moveToEndOfLineAndModifySelection:"; /* shift + end */
}
Logout and login, and the home and end keys will work like Windows.
These changes appear to work in any OS X GUI app, but they don’t seem to apply to the Terminal. For those of you who are unaware, you can jump to the beginning of a Terminal line using control-a, and the end by pressing control-e.

My .Mac Web Gallery
Recent Comments