Terminal is inarguably useful, but it does have its annoying quirks. For example, there are lots of standard key combinations for moving the cursor that don’t work on the Terminal command line. MacOSXHints.com reader asmeurer, however, found a way to create his own keyboard shortcuts for use in Terminal windows:
In Terminal, under the Keyboard tab of a theme (Preferences -> Settings), you can add custom keyboard shortcuts. However, if you try to add a shortcut that includes a modifier key, you will run into a problem: the entry form seems to make it impossible to enter that modifier or even the escaped octal number for it.
One way around this is to type a backslash (
) in the entry form. That will enter a double backslash (
). Press the left arrow key and then the forward Delete key. This will delete one of the backslashes. The remaining one can then serve as an escape character. You could, for example, enter
033
to emulate the Option key.Another way to insert escaped characters is to look up the octal value for the key you want in the table at this Wikipedia article, find the corresponding control sequence, and type that in the entry box. So, for example, to enter the octal code for the Option key (