terminal - VS Code 终端不会将选项键映射到元

标签 terminal keyboard visual-studio-code iterm2

我正在尝试在 VS Code 的终端中启用选项/alt 键作为 Meta。我在 settings.json 中设置了 "terminal.integrated.macOptionIsMeta": true 但它不起作用。

我对我的系统终端应用程序和 iTerm2 进行了同样的更改。

iTerm 是唯一有效的。在 iTerm 中,选项键映射到 Meta,但在 VS Code 终端或终端中则不然。

有谁知道为什么会这样或如何纠正它?

OS X 10.15.7
VS Code Version: 1.63.2
iTerm2 Build 3.4.12
Terminal Version 2.10 (433)

VS 代码

enter image description here

enter image description here

iTerm2 enter image description here

终端

enter image description here

最佳答案

这似乎是 OS X 如何处理 tmux-键盘集成的问题,而不是 VS Code 的问题。

Option/Alt 和 Esc/Meta 之间的关系不太好。即使您的终端模拟器中启用了此功能。因此,当将 Meta+ 绑定(bind)到 .tmux.conf 中的操作时,结果行为与预期不符。

bind -n M-j select-pane -L
bind -n M-k ​select-pane -R

Alt+jAlt+k 按预期工作。

但是,绑定(bind)Meta+[DirectionKey]时:

bind -n M-Left select-pane -L
bind -n M-Right select-pane -R

Alt+LeftAlt+Right 不起作用,您需要使用 Esc+LeftEsc+Right.

关于terminal - VS Code 终端不会将选项键映射到元,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/70827072/

相关文章:

node.js - 使用 TypeScript 中的类型导入 Node 和表达

java - 告诉 System.out.print() 在 java 中打印到哪里

terminal - 使用 AppleScript 编辑器在终端中输入多个命令

c - 如何将代码从终端重定向到绘图应用程序?

angularjs - 出现键盘时, ionic 内容不会调整大小

Android 键盘解雇

macos - 我可以从终端快速搜索/替换多个 .txt 文件吗?

javascript - 如何在 react 中正确创建 cmd+K 键盘快捷键?

visual-studio-code - 由于未绑定(bind)断点,在 VS Code 中调试 Blazor WASM 失败

ubuntu - Visual Studio Code Ubuntu aspnet core 2 容器调试