Fix Mac’s Home and End keys

Fix Mac’s Home and End keys


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.

10 thoughts on “Fix Mac’s Home and End keys

  1. thinkdunson says:

    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.

  2. Chris says:

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

  3. Anonymous says:

    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.

  4. Anonymous says:

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

    Cmd+Right Arrow does what END does on a PC keyboard,
    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.

  5. Arjan says:

    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 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.

Comments are closed.

Discuss this article with the rest of the community on our Discord server!


Maker Faire Bay Area 2023 - Mare Island, CA

Escape to an island of imagination + innovation as Maker Faire Bay Area returns for its 15th iteration!

Buy Tickets today! SAVE 15% and lock-in your preferred date(s).