I am trying to enable the option/alt key as Meta in my terminal in VS Code. I set the "terminal.integrated.macOptionIsMeta": true
in my settings.json
but it is not working.
I made this same change to my system Terminal app and iTerm2.
iTerm is the only one that works. In iTerm the option key is mapped to Meta but not in the VS Code terminal or Terminal.
Does anyone know why this could be or how to correct it?
OS X 10.15.7
VS Code Version: 1.63.2
iTerm2 Build 3.4.12
Terminal Version 2.10 (433)
VS Code
iTerm2
Terminal
This appears to be an issue with how OS X handles tmux-keyboard integration, not VS Code.
The relationship between Option/Alt and Esc/Meta does not work well. Even if this feature is enabled in your terminal emulator. Consequently, when binding the Meta+ to an action in .tmux.conf
the resulting behavior is not as expected.
bind -n M-j select-pane -L
bind -n M-k select-pane -R
Alt+j
and Alt+k
work as expected.
However, when binding the Meta+[DirectionKey]:
bind -n M-Left select-pane -L
bind -n M-Right select-pane -R
Alt+Left
and Alt+Right
do NOT work and you need to use Esc+Left
and Esc+Right
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With