Making BASH’s ctrl-left arrow work on OSX
- April 8th, 2010
- Posted in Computers
- Write comment
One of the things I missed the most when I moved from a Linux terminal to my Mac has been the ability to move back one word at a time in the terminal. For those of you that don’t know this trick you can press the control key and the right arrow to skip over to the right one word at a time. The other direction should work the same way with control and the left arrow to move back one word at a time. The strange thing is the control-left arrow has never worked for me on my Mac. For some reason this was not enabled in Terminal.app.
To do so go into Terminal -> Settings and then press the Settings tab. On the right there should be a bunch of of Key to Action mappings. Under the mappings there is a “+“. Press that. What you want is to have the settings be:
- Key: cursor left
- Modifier: control
- Action: send string to shell:
- In the blank space you want: \033b
To get the \033 control character, press the ESC key followed by a lowecase “b“.
After that press OK and you should be done. Your window should look something like this:

To move one word forward at a time, the code is 33f.
@Rosangela Canino-Koning
Looks like it ate my control code: \33f
Bah