You can do this in System Preferences > Keyboard > Keyboard > Modifier Keys.
There are few more - is a good resource.īTW, a lot of people remap the Caps Lock key on the their keyboard (which often isn't used a lot) to be an additional Control Key, which makes these shortcuts even more useful. To jump between words and start/end of lines in iTerm2 pick one of the two solutions below. Ctrl+E or End: Go to the end of the line. Ctrl+E Move cursor to the end of line Ctrl+K Delete from cursor to the end of line Ctrl+U Delete from cursor to the beginning of line Ctrl+L. Ctrl+A or Home: Go to the beginning of the line. Ctl-shift-A selects to the beginning of the line etc)Ĭtl-d: forward delete (very handy on a laptop because Fn-Backspace is an awkward stretch) Use the following shortcuts to quickly move the cursor around the current line while typing a command. list element right - Shift the list element left - End the list. NB: adding shift to each of the above selects the text as you move (e.g. Bear on macOS comes with a lot of shortcuts for you, keyboard enthusiasts.
#Mac end key end of line mac#
Don't forget that the Mac by default also accepts Emacs-style shortcuts, which in many ways are easier to type than the arrow keys, because you don't have to leave the Home Row (especially if you remap Caps Lock to Control - see the end of this post).