Home means the Beginning; End means the End

While Mac programs usually have very consistent user interfaces, and most programmers religiously adhere to Apple’s human interface guidelines, there is one persistent glitch that continues to annoy us: the behavior of the Home and End keys. On a Mac, these keys should always, always, always move the cursor to the beginning and end of the document respectively.

Let me quote here from Apple:

Pressing the Home key is equivalent to moving the scrollers all the way to the top and to the left. In a text document, for example, pressing Home scrolls to the beginning of the document; in a spreadsheet, it may scroll to the beginning of the spreadsheet or to the beginning of a row. These keys should also work in scrolling lists to display the top or bottom of the list.

End is the opposite of Home: It scrolls to the end of a document.

If the beginning or end of the document is already reached, pressing Home or End produces a system alert sound. Pressing the Home or End key has no effect on the location of the insertion point or selected data.

Many applications, however, including some otherwise consistent programs such as Microsoft Word for the Mac and Firefox get this wrong. Usually they move to the beginning and end of the line rather than the document. They may also move the insertion point.

Mac native programs like BBEdit and Safari usually get this right. Misbehaving applications usually derive from Windows code bases. On Windows the convention is different. On Windows the Home key is supposed to move the cursor to the beginning of the line and the end key is supposed to move the cursor to the end of the line. Control-Home moves the cursor to the beginning of the document and Control-End moves the cursor to the end of the document. That is fine for Windows applications but it is not fine for Mac applications, not even Mac applications ported from Windows. It confuses users and causes your application to feel un-Mac-like.

It’s not hard to get this right, and it’s a really simple thing to do. I suspect it’s so commonly done wrong just because it’s so small that most developers overlook it. You’d notice immediately if the close button on a window were a black X instead of a red lozenge, but who even thinks to check where the Home and End keys put the user? Nonetheless, it is significant, and it is worth fixing.

When writing a Mac app please remember:

  • The Home key moves the view to the top of the document.
  • The End key moves the view to the bottom of the document.
  • Neither key moves the insertion point.

Mac users thank you for paying attention to this.

16 Responses to “Home means the Beginning; End means the End”

  1. Ben Says:

    Plus: Page up and Page down scroll the view up and down a page, but don’t move the mouse cursor (hello Microsoftâ„¢ Wordâ„¢)

  2. bob Says:

    You have a typo

    “When writing a Mac app please remember:
    * The Home key moves the view to the top of the document.
    * The Home key moves the view to the bottom of the document.”

    WRONG. That’s what the End key does.

    You’ve also got a font-size tag in the vicinity of “Firefox get this wrong” that’s not properly closed.

  3. Lawrence Says:

    All of a sudden you became an Apple philosophy and design guide lines follower ? 🙂

  4. Viswakarma Says:

    Microsoft Office and similar applications that originate from the MS Windows side are a pain in the neck and cause a fair amount of loss of productivity. Only laziness prevents these application developers from exercising some descipline. The personal computing environment would be lot more pleasant and productive if the Windows application developers followed Apple’s User Interface Philosophies and Guide Lines.

  5. Stan’s List » Blog Archive » Home and End keys on the keyboard Says:

    […] Not only what is supposed to happen with each key stroke, but that some programs do not follow Apple GUI guidelines. One software company is a surprise and another is not. More … […]

  6. timm Says:

    I’m not much of a believer of any kind, but just thinkog of the usability versus being used to something. How often do want to scroll to the end of document while entering text? Versus how often do you want to scroll to the end of line while entering text?
    Would you rather have a special key for the case that occurs a bit more often?
    (I’m not familiar with macs, what do I have to do get to the end of line/beginning of line?)

  7. Gaurav Says:

    <sarcasm>Of course when Apple writes software (iTunes, Quicktime, etc) for the Windows platform they always follow the UI conventions of Windows.</sarcasm>

  8. Elliotte Rusty Harold Says:

    timm,

    Usability requires consistency between applications more than an ideal UI in any one application. It is more important to follow the standards than to make a minor improvement that deviates from the standards. I’ve written about this principle previously.

    That said, I often want to jump to the beginning or the end of the document, especially when merely reading rather than editing a document,

  9. Cay Horstmann Says:

    Disclaimer: I am a defrocked Mac user, muddling along on Linux in my benighted way. It is this attitude of “dogma wins over usability” that made me switch away from the Mac.
    How often do you want to go to the beginning of a document? How often do you want to go to the beginning of a line? Which of these two actions deserves to be given the simple unmodified key?
    Ok, so maybe the Mac designers got this wrong at one point. What would it take to say “Oops, we made a mistake?” That will never happen. A part of the religion of the Mac is that we are supplicants to the All-Knowing One, and that any perceived imperfections are in fact faulty reasoning in our unworthy minds.
    I have no doubt that those who have achieved enlightenment will take this opportunity to point out that consistency (even a foolish one) is more important than usability.

  10. John Says:

    Enjoy your Linux, Cay. Platform conventions are what they are. Those keys have been a longtime convention on the Mac. People are used to them and like them working that way. No need to change this for everyone.

    Without data to back up your opinion, there’s no evidence that one way is more usable than the other. Your idea does make logical sense, though.

    There are examples of things that have come to the Mac UI that originated elsewhere–Alt-Tab (Command-Tab) for example. With all the switchers and multi-platform users, Apple would do well to at least add some configuration switches for differing conventions like these. If people tell Apple about this, maybe they’ll listen.

  11. Stuart McHattie Says:

    In response to Tim who asked: (I’m not familiar with macs, what do I have to do get to the end of line/beginning of line?)

    Well as long as the Mac conventions are being followed (which is another point all together) the way to get to the beginning of the line is to press Command + Left or Command + Right (where command is the name for the Apple key on the keyboard)

    Whilst this is two keys instead of one, it does give us a second function that you don’t have on Windows (the one to jump to the beginning or end of the document) although I have to admit I would prefer if Home and End did as they do in Windows and that the two key combination was to go to the beginning and end of the document.

    Macintoshes are often knocked down by Windows users, and I can understand why. Stick with what you know eh? Well I used to hate Macintoshes but since playing with someone else’s iBook around 3 years ago, I think Macintosh is far superior to Windows in power and functionality … and more importantly in being able to do things in fewer steps. There is a lot more quality freeware on a Mac than for a Windows based PC and on top of that there’s NO spyware and NO viruses at all. The OS is built on a solid Unix base which means security comes first, making the job of viruses impossible without the users permission. Try one, go to an Apple shop and have a go for half hour … you’ll be impressed if you ask them to show you what they can do. If you sit in front of it, you’ll be confused, but if you shut out all your expectations of Windows, then the Mac is the answer to all those times you’ve tried to do something in Windows and it won’t do it, and you say “I really hate computers”

    Well that’s my 2 cents anyway!

  12. bloodnok Says:

    Firefox and Thunderbird don’t get this wrong. They both have that irritating Mac behaviour by default. Unfortunately, my reflexes insist that the Home key take me to the beginning of the line I’m editing and the End key to the end of same. The best answer to this conundrum is found in TextWrangler wherein it’s simply a Preference choice on the Edit:Keyboard pane. Downloaded default is the Mac way. Perfect. For Firefox and Thunderbird, I had to get a hack which I then have to remember to reapply on each upgrade. See here for the hack in question (instructions at the bottom—use the End key).

  13. Gus Says:

    The Home/End behavior in the Mac is not “Mac like”, it is a direct result of the use of the archaic Emacs key mappings. The Emacs key mappings were designed at the time of the VT52/100 terminals, which did not have Home, or End. So when those keys were added to keyboards, they were given functions that didn’t already have key combinations. They were less important functions, because the most important functions already had keys. It’s the classic computing battle of progress vs backwards compatibility.

    What I think is funny is that Apple, and Mac fans pride themselves in the fact that their platform chooses “better” over “more compatible”. Meanwhile they are using a key mapping from the ’70s while Windows dropped the old WordStar key mappings (Shift-Insert) in favor of the much more usable Ctrl-V.

    As the length of a document approaches infinity, the percentage of a document accessible by the Mac “End” key approaches 0. And the function of the Mac “End” key is simply to change the viewport, not insertion point. So you can’t even use it to append to a document. It’s a whole key just to glimpse the last page of a document. Then you have to use a combo key to do the continual tasks of appending or prepending to a line, or inserting blank lines before or after text.

    I’ve used Mac since System 6. I experienced the milestones: II, IIgs, Classic, NeXT. I saw the genius, and I saw the stupidity. They were right on Ctrl-XCV, they’re wrong on this.

  14. Julian McNally Says:

    Wow! I came here just to find out how to get my cursor from a point in the document to the end (beginning) of the line. Then when Tim asks the question, he has to wait 4 posts and two weeks for the answer.

    Who’s for usability?

    Fortunately, I found out how to make my Mac behave the way I want here: http://vincentcreative.blogspot.com/2008/02/windows-homeend-keys-on-your-apple-mac.html

  15. Christopher Karl Johansen Says:

    Thoughts on logic, dogma, usability, pragmatism.

    Should not a key with the legend “Start” (or “Beginning”, but “Start” better fits the small space) be the opposite of “End”?

    Should not a key labelled “Home” take one to the root node of the entity in view?

    If “Home” and “End” go to the start and finish, what should “Control-Home” and “Control-End” do?

    As a pragmatist context-switching all day among several systems but mostly using web browsers I use a least-effort strategy. I hit “Home”–if that only moves me to the beginning of the line I hit “Control-Home” and make mental note of it in my short-term memory.

  16. Marius Says:

    Give DoubleCommand a try to remap Home/End.

    It works where other methods fail… for instance with Java apps (Eclipse, Java SAPGUI, etc)

    I use a combination of DefaultKeyBinding.dict and DoubleCommand to get it all working 100%.