Making iTerm to translate ‘meta-key’ in the same way as in other OSes

In bash shell with emacs key-binding, you can use key combination like M-f, M-b to move one word forward or backward on the shell prompt respectively. Usually, the meta key is mapped to Alt key on Windows and Linux. However, in iTerm, I could not find a way to map this meta key to either Option or Command key on my MacBook Pro.

It seems that in OS X, the meta key is by default mapped to ESC key. So you can use ESC-f, ESC-b on iTerm. However, ESC key is apparently not practical to use. In addition, iTerm does have option that allow you to modifier mapping for the meta key (Bookmarks > Profiles > Keyboard Profiles > Global > Option Key as…), this setting does not seem to work at all.

Therefore, if anyone know what is the solution to this problem, please let me know.

I have upgraded to the latest release, 0.9.6.1012, and this behavior is still persist.

Edit: Some clarification to my question. The key-binding I’m talking about is for bash shell, not in emacs. It just happens that, by default, bash shell also use the same key-binding as emacs.

13 Answers
13

Leave a Comment