

- #Mac os terminal shortcut key mac os x#
- #Mac os terminal shortcut key code#
- #Mac os terminal shortcut key download#
#Mac os terminal shortcut key code#
It isn't necessary to do the "backslash-left arrow-forward delete" shuffle in order to enter the control code for Escape in the text box, although that method is often described. What you are creating is a shortcut that says "When I press Option-left arrow, send Escape-b to the shell" and "When I press Option-right arrow, send Escape-f to the shell". The control code for Escape-b (one word back) is \033b, and for Escape-f (one word forward) it is \033f. In most cases the "what to send" will be a control code. When you create a keystroke shortcut in Terminal you select the primary key that will trigger the shortcut (an arrow key in this case) from the top drop-down, a modifier key (Option in this case) from the second drop-down, the desired action (Send to shell in this case) from the third drop-down, then you enter what it is you want to send to the shell in the text box. For starters, \033 is not the control code for Option (as you stated), it is the control code for Escape. It works as described, but not for the reasons described. You cannot possibly remember the new shortcuts so having the shortcuts in front of you gives the ability to look at it at a quick glance. The best way to learn new keyboard shortcuts is by keeping a cheat sheet pinned to your disk.
#Mac os terminal shortcut key download#
I came looking for this hint after it appeared in the November 2010 Macworld. Download FREE terminal shortcut cheatsheet. The solution is to click on the + beneath the sheet, like you are adding a new shortcut, and it will work and let you close that. Note: I encountered a bug where it wouldn't let me close the pull-down sheet.
#Mac os terminal shortcut key mac os x#
So if you want option-left and option-right to act like they do in normal Mac OS X Cocoa text boxes, you can map option-left arrow and option-right arrow to \033b and \033f, respectively (see, this is actually two hints in one!). It also turns out that this is the same as escape, so you can just press the esc key if you want Option. Another option is to look up the octal value for the key you want in the table at this Wikipedia article, and type the corresponding control sequence. You can, for example, use \033 to emulate the Option key. This will delete one of the backslashes, allowing you use the remaining one as an escape. Then arrow key left and type a forward delete. The way around this is to type a backslash \, which will enter \\.

This is because the entry form seemingly makes it impossible to enter a modifier key or the escaped octal number for it.

However, if you try to add a custom shortcut that types a modifier key, you will have some difficulty. In Terminal, under the Keyboard tab of a theme, you can add custom keyboard shortcuts.
