random technical thoughts from the Nominet technical team

Make [Home] and [End] work in Mac OS X Terminal

1 Star2 Stars3 Stars4 Stars5 Stars (1 votes, average: 5 out of 5)
Loading ... Loading ...
Posted by chris on May 10th, 2006

For some reason, the Home and End keys don’t work as you might expect in Mac OS X’s Terminal.app. Instead of moving the cursor to the start and end of the current line, they scroll to the top and bottom of the window’s scrollback history.

You can get the behviour you might expect by pressing Shift+Home and Shift+End, but this is awkward. To fix this and make Home and End do what you expect:

  1. Open a fresh terminal window
  2. Choose Terminal->Window Settings from the menu
  3. Select “Keyboard” from the drop down list
  4. Select “End” in the list and press Edit
  5. Choose “send string to shell” and then move to the textbox
  6. Press <Esc> (33 will appear) then type [F. Press OK.
  7. Select “Home” in the list and press Edit
  8. Choose “send string to shell” and then move to the textbox
  9. Press <Esc> (33 will appear) then type [H. Press OK.
  10. Press “Use Settings As Default”

5 Responses

  1. P4p4 n0eL Says:

    For me, those tips didn’t work…
    But 01 (Control+a) for home and 05 (Control+e) for end worked just fine on my MacBook ;)

  2. P4p4 n0eL Says:

    By 01 and 05 understand \01 and \05…

  3. P4p4 n0eL Says:

    …ok, sure this time that’s it : \001 and \005

  4. MarkM Says:

    I’m on a macbook and ssh’ing to an Ubuntu Server box. This didn’t work for me when in a Linux terminal but the following page fixed it perfectly:

    http://crz.lt/2007/11/23/leopard-terminal-naming-tabs-selecting-path/

  5. Alex Says:

    I’m on an iBook G4 with Mac Os X 10.5 and this trick did it :-) . Thanks a lot. Alex

Leave a Comment

Please note: Comment moderation is enabled and may delay your comment. There is no need to resubmit your comment.

Recent Posts

Highest Rated

Categories

Archives

Meta: