MacOS – Restore option-left and option-right in MacOS terminal – What is the action sequence

macosshortcutterminal

In my terminal, in settings->profiles->keyboard, I set some shortcuts for option-left and option-right. When I realised that these had overwritten the default "move to beginning/end of word" behaviour, I deleted them. However, now that shortcut doesn't work at all.

For example, the shift+left shortcut says \033[1;2D. Does anyone know the magical incantation for beginning/end of a word?

Best Answer

I have the following settings:

  • Option Left is \033b
  • Option Right is \033f