Terminal Icon

Creating custom control sequences in Terminal

You can create custom control sequences in Terminal to help you with your work. For example, pressing Control-H in some shells is interpreted as a backspace. You can reprogram another key (such as the Escape key) to do this instead.

  1. Open Terminal and choose Terminal > Window Settings.
  2. Choose Keyboard from the Terminal Inspector pop-up menu.
  3. Choose an existing key and click Edit, or click Add to create a new key combination.
  4. Choose a key from the Key pop-up menu.
  5. Choose a modifier key from the Modifier pop-up menu (choose "none" if you don't want to use a modifier with the key you selected).
  6. Choose what you want the key to do from the Action pop-up menu.
  7. Type the string you want to assign to this key combination and click OK.

If you can't type the characters in the text field, press the Option key while you type. In the example above, if you press Control and type H, the cursor backspaces since Control-H means backspace in text fields. Press Option and then press Control-H to enter this as the new control sequence.

See also

window settings

Open this for me

Terminal