Mac – Setting Home and End of Line in Terminal

In Mac Terminal:

  • fn + left arrow: scroll to top
  • fn + right arrow: scroll to the bottom
  • fn + up arrow: page up
  • fn + down arrow: page down

 

I would like to set the action of the fn + left arrow as to be Home of Line as well as End of Line for fn + right arrow. So you can open the Terminal Preference –> Settings –> Keyboard Widget.

 

Double click the key and set the Action to send string to shell: with the following values.

  • home key: \033OH
  • end key: \033OF

 

You can now try it out in the Terminal. You can even use these keys in vi. Please note that you have to set it for different Terminal Theme

Done =)

Reference: Mac OSX Terminal Page Up/Down + Home/End of line

2 thoughts on “Mac – Setting Home and End of Line in Terminal”

Leave a reply to caroline Cancel reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.