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.


Recent Entries

Comments

Oldest 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

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


Posted by: Anonymous on July 30, 2008 at 10:56 AM

What could be "easier" than hitting the "home" or "end" keys to move the cursor to beginning or end of a line?

I love both my Mac and PC, but admittedly the Mac has some silly workflow issues like this one.


Posted by: Anonymous on September 17, 2008 at 12:17 PM

I found myself adapting pretty easily, after some keyboard/forehead banging.

Cmd+Right Arrow does what END does on a PC keyboard,
and
Cmd+Left Arrow does what HOME does.

And as far as selecting everything to the end/beginning of line, Cmd+Shift+Arrow works. :)

It really only took a week to make a habit.


Posted by: Arjan on January 18, 2009 at 1:42 PM

This did not work for me to stop Firefox from going back one page when hitting Cmd-Left Arrow on a MacBook. However, the Firefox extension keyconfig does help. After installing go to Tools, Keyconfig and choose Disable for the option "Back - Cmd-Left".

To see the effect go to http://tinymce.moxiecode.com/ and then go to the examples. Hitting Cmd-Left in the editor will normally get you to the previous page, but when using Keyconfig the cursor is taken to the start of the current line.


Leave a comment


Subscribe to MAKE!Subscribe to MAKE Magazine!

Subscribe today, save 42% and get web access to MAKE free. MAKE Digital Edition is available only to subscribers.

$34.95 / 1 year
(4 Quarterly Issues)

Subscribe now


Void your warranty, violate a user agreement, fry a circuit, blow a fuse, poke an eye out. Make: The risk-takers, the doers, the makers of things... Welcome to Make: Online!


CRAFT Maker Shed Maker Faire MAKE television




Check out more videos from MAKE.

Maker SHED

Connect with MAKE

Be a MAKE fan on Facebook MAKE on Facebook
Visit our Facebook page and become a fan of MAKE!
MAKE on Twitter MAKE on Twitter
Follow our MAKE tweets!
MAKE Flickr Pool MAKE on Flickr
Join our MAKE Flickr Pool!
    make_tips on Twitter



    MAKE Archives

    Make: Money

    Make: Science Room
    Subscribe to MAKE Magazine!

    Make: Online editors and authors!

    Gareth BranwynGareth Branwyn
    Editor-in-Chief


    Phillip TorronePhillip Torrone
    Senior Editor
    | Web | Twitter


    Becky SternBecky Stern
    Associate Editor
    | AIM | Twitter


    Marc de VinckMarc de Vinck
    Contributing Writer
    | AIM | Twitter


    John ParkJohn Park
    Contributing Writer
    | Twitter


    Sean RaganSean Ragan
    Contributing Writer
    | Twitter


    Matt MetsMatt Mets
    Contributing Writer
    | AIM | Twitter


    Dale DoughertyDale Dougherty
    Editor & Publisher
    | Twitter


    Shawn ConnallyShawn Connally
    Managing Editor
    | Twitter


    Goli MohammadiGoli Mohammadi
    Associate Managing Editor

    Kip KayKip Kay
    Weekend Projects
    | AIM | Twitter


    Collin CunninghamCollin Cunningham
    Contributing Writer
    | AIM | Twitter

    Adam FlahertyAdam Flaherty
    Contributing Writer
    | AIM | Twitter


    John BaichtalJohn Baichtal
    Contributing Writer
    | AIM | Twitter



    More contributors: Mark Frauenfelder (Editor-in-Chief, MAKE magazine), Kipp Bradford (Technical Consultant/Writer), Chris Connors (Education), Diana Eng (Guest Author), Peter Horvath (Intern), Brian Jepson (O'Reilly Media), Robert Bruce Thompson (Science Room)

    Suggest a Site!

    Advertise here with FM.

    Why advertise on MAKE?
    Read what folks are saying about us!

    Click here to advertise on MAKE!



    Current Podcast

    itunesdl.gif Behind the Scenes at MAKE and CRAFT In January, many of the remote MAKE/CRAFT team members (myself included) convened at the Maker Media headquarters at O'Reilly Media in Sebastopol, California. Take a look behind the scenes of your favorite DIY publications as Goli Mohammadi gives us... More...

    Get the Make: Online sent via email
    Enter your email to receive Make: Online each day:



    Sign up for the Make: Newsletter

    Our Make: Newsletter covers news from maker Media, has original columns, Shed deals, and more! You can also read the archives of past issues.


     



    MAKE Fascination video series brought to you by Dow

    Make: Education
    MAKE: en EspaƱol MAKE: Japan
    Important please read


    Subscribe to MAKE Magazine!

    Recent Posts from the Craft: Blog