Macos – How to use key combinations with the option (⌥) key in iTerm2.app

itermmacosterminal

OS X / Apple keyboards offer these handy keyboard shortcuts for funky Unicode characters, like + . gives an ellipsis character (). How can I use these inside iTerm2.app? Whenever the key is pressed in combination with another key it seems to trigger an error (with a sound and everything)

I found this in the iTerm 2 FAQ:

Q: How do I make the option/alt key act like Meta or send escape codes?
A: Go to Preferences → Bookmark tab. Select your bookmark on the left, and then open the Keyboard tab. At the bottom is a set of buttons that lets you select the behavior of the Option key. For many users esc+ will be the best choice.

So I went to Preferences → Profiles → [My Profile] → Keyboard and there I changed the bottom two options to “+esc” instead of “normal” (the default).

Preferences → My Profile → Keyboard

But even then, I cannot type special characters using key combinations with the key.

There’s also a Keyboard section in the Preferences, looking like this:

http://i.stack.imgur.com/OAZWk.png

Would I have to change anything there?

P.S. Note that this works out-of-the-box in OS X’s Terminal.app.

Best Answer

To fix iTerm 2's behavior, go to Preferences > Profiles > Keys and set the left (and/or right) Option key to act as "Normal":

Screenshot

That way you'll be able to enter key combinations for umlauts, accents, etc.

If you have several profiles defined, you'll have to make the change for each one.