I need Option for typing some special characters, so I cannot use Terminal.app’s “Use Option as Meta key” setting. But I cannot bear to do without an ESC-emitting Meta key either.
Eventually I got around to trying out iTerm2, and discovered that it allows one to choose to treat only one of the Option keys as a +ESC key (I chose the left one), which is absolutely perfect and exactly what I was after.
But I’ve basically spent all my time with it so far making it more like Terminal.app. Literally the only feature I like is the Left-Option binding; everything else it does differently from Terminal.app, I dislike.
And it’s ugly. From the icon on down.
So I wonder, is there any way I could teach Terminal.app this trick, to bind only one of the Option keys as Meta, so that I can ditch iTerm2?
Best Answer
There's probably a better way to do this, but you could try saving this as private.xml in KeyRemap4MacBook:
This wouldn't work with repeated key presses:
__KeyToKey__ KeyCode::OPTION_L, KeyCode::VK_NONE, Option::KEYTOKEY_BEFORE_KEYDOWN, KeyCode::ESCAPE