Option key does not work as Meta in Tmux
For other folks who find their way here via their favorite search engine, I was able to solve this problem by simply going to Preferences -> Profiles -> Keyboard and checking "Use Option as Meta key" for the terminal profile I'm using.
I'm running weechat
under tmux
, and default key bindings make heavy use of the meta
key.
I would suggest using iTerm2 instead of the default Terminal.app, as it is better for many reasons.
Specifically, you would be interested in iTerm2's options to map left/right option as "+Esc", which works much better than trying to have it emulate Meta for every purpose I can think of or have tried.
This setting is located under:
- Preferences
- Profiles
- [select a profile]
- Keys
- [select a profile]
- Profiles
I had the same problem and none of the answers provided here worked. That is, I too had the iTerm2 [Option]
key remapped to [+Esc]
(aka. "fallback"-[META]
) in my "Preferences -> Profiles -> Keyboard", as described in the other answers, but still could not change my tmux pane layout with [CTRL]-[b]
, [+Esc/META]-[DIGIT]
.
Then I found that under "Preferences -> Keys", there is a "Navigation Shortcuts" where [Option]
+ (any) [DIGIT]
is mapped to "switch split panes" (remember [Option]
is remapped to [+Esc]
, so that's a clear collision). Therefore, after un-setting that (to an empty key value), I finally can again comfortably resize my tmux panes with [CTRL]-[b]
, [+Esc/META]-[DIGIT]
(instead of having to use [CTRL]-[b]
, (the real) [Esc]
, and then the desired layout [DIGIT]
).