I'm on Mac OSX Catalina (10.15.3) and find that while I can use the emacs keybindings CTRLe and CTRLa to move to the end and beginning of a line respectively, I cannot use those command in combination with the SHIFT key.

My expectation would be that it would move the caret to the end/beginning of the line while selecting characters.

In other related answers I see the suggestion to move to iTerm2. However, I would like to minimise the number of "duplicate" applications on my mac.

  • This does not answer your question, but: Notice that CTRL-A and CTRL-E are passed on by Terminal.app and interpreted by the shell. CTRL-SHIFT-whatever, however, are not (by default) passed on by Terminal, because there is no established way of doing so, and they are thus never seen by the shell. (You could go into the "keyboard" tab in the settings dialogue and change this). Furthermore, a general "select text" operation cannot be implemented by the shell, because it does not "know" what is on the screen; only Terminal.app knows that. Mar 2, 2020 at 8:33
  • @TurePålsson thanks for the clarification.I guess that's also the reason one can only "kill" and ''yank" whole lines and not parts? When you say You could go into the "keyboard" tab in the settings dialogue and change this, could you perhaps point me to a resource where I can find how I can change this? I did not understand what key sequence (of the form \033...) would do what I want. Mar 2, 2020 at 8:54
  • It should still be possible to kill and yank parts of a line, but it depends on the shell. In the zsh that comes with Catalina, C-SPC,C-w and C-y seem to work just like I would expect them to in Emacs. Those \033... things are the character sequences sent by Terminal when you type that key combination (\033 is an ESC character, 33 octal = 27 decimal). So you'd need to figure out what characters your shell wants for "start marking", and make Terminal send those characters. However, I suspect that there is no such character string in most shells. Mar 2, 2020 at 9:08

1 Answer 1


Press 2 to start "marking text".

  • Doesn't work here, do you have something special defined in your .inputrc?
    – nohillside
    Mar 2, 2020 at 8:06
  • Hrm… no, but I might have something in my zsh config files. Will see if I can figure out what that is.
    – TJ Luoma
    Mar 2, 2020 at 20:51

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .