Tip of the Day: Fixing Home and End Keys in Leopard's Terminal.app

05/11/2008

By default in Terminal.app the home and end scroll the the top of the screen and the end of the screen buffer respectively. To make Terminal act like a normal console (in other words the home key moves the cursor to the beginning of the line, and the end key moved the cursor to the end of the line, etc) do the following:

  • Open Terminal
  • Open Terminal's preferences
  • Goto the Settings Tab
  • Goto the Keyboard Tab as shown below Terminal Settings
  • Select the end key settings
  • Change the action setting to send string to shell as below End Key Setting
  • In the text box below the action setting, enter the key combination of ctrl-e.
  • The text \005 should appear like below End Key Setting Entered
  • Click OK
  • Select the home key
  • Change the action setting to send string to shell
  • For this key enter the key combination of ctrl-a
  • The text \001 should appear like below
  • Click OK and close the preferences.

The end and home keys should now act like a normal console in Terminal. Enjoy!

Resource: http://blog.yiqiang.org/2007/12/fixing-home-and-end-key-for-terminalapp.html

There are 8 comments to this article:

  1. Mike says:

    05/11/2008

    Thanks -- Thats one less annoying Mac-ism.
  2. Joe says:

    05/11/2008

    Thank you, this was driving me absolutely crazy!
  3. Junrey says:

    11/22/2008

    Thank you so much. This saves my day.

  4. Eric A. says:

    11/29/2008

    Great tip! Saved me the move back to iTerm.

  5. Rob says:

    12/22/2008

    Thanks for your tip. I don’t really understand why apple decided that the home/end keys should work like this in the first place.

  6. Shawn says:

    02/12/2009

    Wow, thanks. I can’t tell you how much this has been annoying me.

  7. Ellis - Replicas Watches says:

    02/18/2009

    Hi! It’s really nice news, thought i wasn’t annoyed so much as Shawn did)) I’m still glad to leard about such improvement. Hope it will work perfectly well since now!

  8. watchgy - rolex replica says:

    05/25/2009

    It is very useful, thanks a lot

Write your comment: