The Artima Developer Community
Sponsored Link

Java Buzz Forum
Home means the Beginning; End means the End

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
Elliotte Rusty Harold

Posts: 1573
Nickname: elharo
Registered: Apr, 2003

Elliotte Rusty Harold is an author, developer, and general kibitzer.
Home means the Beginning; End means the End Posted: May 16, 2007 6:11 AM
Reply to this message Reply

This post originated from an RSS feed registered with Java Buzz by Elliotte Rusty Harold.
Original Post: Home means the Beginning; End means the End
Feed Title: The Cafes
Feed URL: http://cafe.elharo.com/feed/atom/?
Feed Description: Longer than a blog; shorter than a book
Latest Java Buzz Posts
Latest Java Buzz Posts by Elliotte Rusty Harold
Latest Posts From The Cafes

Advertisement

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 moves the cursor tom 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.

Read: Home means the Beginning; End means the End

Topic: links for 2007-05-10 Previous Topic   Next Topic Topic: For the first afternoon session, Bruce Johnson and Joel Webber discuss the Google Web Toolkit.

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use