(This is an answer to an old question on this forum which can't be replied to.)
(Updated 6-Dec-2015 for IDE 1.6.6)
Mac OS X has the Home and End keys on the keyboard go to the top and bottom of the file by default, and this can be frustrating to those, like me, who want them to go to the start and end of the line. The Arduino 1.0.5 IDE for Mac also has this behavior, but I've discovered a way to fix it.
Find the preferences.txt file by starting from the Arduino menu / Preferences. Once you have found the file in Finder, exit the Arduino IDE so you can edit the file in TextEdit. See http://arduino.cc/en/Hacking/Preferences for details on this operation.
You must have Arduino IDE version 1.6.6 or later.
Quit the Arduino IDE before you open and save preferences.txt or the changes won't be applied.
The entries to change are these:
editor.keys.home_and_end_beginning_end_of_doc=false
editor.keys.home_and_end_travel_far=false
This will make Home and End keys just go to the start and end of the line. Thank you, developers, for putting in this useful option.
Now my IDE works like my other IDE's on the Mac, where I have changed keyboard mappings for Home and End using these instructions: http://mwholt.blogspot.com/2012/09/fix-home-and-end-keys-on-mac-os-x.html.
-Bob