Fix Mac's Home and End keys

homeend_20070712.jpg

Brian Litzinger writes:

Coming from many years of using a PC I like my home and end keys to work like they do on a PC, not on the Mac. Not sure if you prefer the PC or Mac defaults for home and end, but here is how you change it. This will change how the home and end keys work in every program.

Save this to Users/username/Library/KeyBindings/DefaultKeyBinding.dict

{
    "\UF729"  = "moveToBeginningOfLine:";
    "$\UF729" = "moveToBeginningOfLineAndModifySelection:";
    "\UF72B"  = "moveToEndOfLine:";
    "$\UF72B" = "moveToEndOfLineAndModifySelection:";
    "\UF72C"  = "pageUp:";
    "\UF72D"  = "pageDown:";
}

After saving the file, your home and end keys will work like they do in most other operating systems, moving the cursor to the front and end of a line. Holding shift will cause the whole line to be selected. The last couple lines also adjust the page up and down keys, which will move the cursor up and down a page instead of just scroolling. Any applications you are running will need to be restarted before this takes effect.

Posted by Jason Striegel | Jul 12, 2007 07:49 PM
Mac | Permalink | Comments (2) Bookmark and Share

Recent Entries

Comments

Newest comments listed first.

Posted by: thinkdunson on December 14, 2007 at 2:01 AM

you know there are keyboard shortcuts already that do all of those things. maybe i'm blinded by my macaddiction, but i much prefer the mac style of things. i think people "prefer" the pc way because they won't take the time to learn the better way.


Posted by: Chris on April 19, 2008 at 12:35 PM

Thanks

This is the only thing that has driven me crazy about my mac...thanks for posting.


Leave a comment



Bloggers

Welcome to the Hacks Blog!

Brian Jepson.Brian Jepson


Jason Striegel.Jason Striegel


Philip Torrone.Phillip Torrone



See all of the books in the Hacks Series!
Advertise here.

Recent Posts

www.flickr.com
photos in Hacks More photos in Hacks