I use the Mac terminal a fair amount, and it’s annoying that by default, the Home (↖) and End (↘) keys on my Mac keyboard don’t do anything.
Fortunately, I found the solution!
- Open the Terminal preferences, and select the Profiles tab.
- Choose your active profile, and select the Keyboard tab.
- Add a mapping for the Home key, with no modifier, and in the text box type Ctrl+A. It should display as “\001”.
- Add another mapping for the End key, with no modifier, and in the text box type Ctrl+E. It should display as “\005”.
Close the preferences window and that’s it! Your Home and End keys are now working!