最近,在我转移到新工作站后,切换 vscode 集成终端的快捷方式似乎不起作用。当前的快捷键是
Ctrl+Shift+Alt+A
并且它在快捷键面板中设置正确,但是使用该组合键会产生这个奇怪的字符 Á
。问题不仅在于A
,还在于其他字母。例如,Ctrl+Shift+Alt+S
结果为 §
,Ctrl+Shift+Alt+D
结果为 Ð。奇怪的是,它并不总是发生。我不确定它什么时候会改变它的行为。任何线索将不胜感激。谢谢你。
在我发布这个问题后,我再次输入了相同的组合键。但这次不知为何我中途停了下来,只输入了
Ctrl+Shift
。有那么一会儿,我在屏幕的右边缘看到了一些东西。我再次输入相同的键,发现通过单击 Ctrl+Shift
,我在两个键盘布局 English (US)
和 English (International)
之间切换。这就是输入 Ctrl+Shift+Alt+A
导致 Á
的主要原因。解决方法是删除该布局。
Time & Language
,Preferred languages
部分,其中列出了所有不同的键盘布局。English (United States)
,然后单击 Options
US (International)
,然后选择删除。这应该可以解决问题。希望如此。
在英国键盘上这对我有用 顺便说一句,关键是:CTRL+` 即 ctrl 键 + 反引号
[
// switch focus between terminal and editor
{
"key": "ctrl+oem_8",
"command": "workbench.action.terminal.focus",
"when": "!terminalFocus"
},
{
"key": "ctrl+oem_8",
"command": "workbench.action.focusActiveEditorGroup",
"when": "terminalFocus"
}
]
我在 PT-BR 键盘中使用 Kubuntu。我用
"ctrl+oem_8
替换了 "ctrl+'"
并且工作得很好。
按
Ctrl+Shift+P
并打开此 Preferences: Open Keyboard Shortcuts(JSON)
(不带默认值)并复制如下所示的两个按键绑定。
如果您之前没有编辑过此文件,它应该如下所示:
// Place your key bindings in this file to override the defaultsauto[]
[
{
"key": "ctrl+'",
"command": "workbench.action.terminal.focus",
"when": "!terminalFocus"
},
{
"key": "ctrl+'",
"command": "workbench.action.closePanel",
"when": "terminalFocus"
}
]