我喜欢在键盘上使用德语变音符号“ö”,“Ö”,“ä”和“Ä”在VSCode中进行编码,即使用这些键键入方括号和大括号。这是我在keybindings.json
中尝试过的事情:
{ "key": "ö", "command": "type", "args": { "text": "[" }, "when": "editorTextFocus" },
{ "key": "ä", "command": "type", "args": { "text": "]" }, "when": "editorTextFocus" },
{ "key": "Shift+ö", "command": "type", "args": { "text": "{" }, "when": "editorTextFocus" },
{ "key": "Shift+ä", "command": "type", "args": { "text": "}" }, "when": "editorTextFocus" },
{ "key": "Alt-ö", "command": "type", "args": { "text": "ö" }, "when": "editorTextFocus" },
{ "key": "Alt-ä", "command": "type", "args": { "text": "ä" }, "when": "editorTextFocus" },
{ "key": "Alt-Shift+ö", "command": "type", "args": { "text": "Ö" }, "when": "editorTextFocus" },
{ "key": "Alt-Shift+ä", "command": "type", "args": { "text": "Ä" }, "when": "editorTextFocus" }
VSCode抱怨:
您将无法在当前环境下生成此组合键 键盘布局。
有没有一种简单的方法可以教VSCode允许绑定任何键,而不仅仅是预定义键?
答案 0 :(得分:0)
允许使用这些,毕竟预定义的“ Toggle集成终端”快捷方式是 Ctrl + ö。您只是不能用JSON文字写出字符。
我通常也喜欢自己使用JSON编辑器,但这实际上是UI很有帮助的情况。在“请输入所需的组合键”弹出窗口中,您可以通过QWERTZ键盘看到它。
ö
上交oem_3
ä
上交oem_7
ü
上交oem_1
答案 1 :(得分:0)
感谢@ Gama11提供有关UI的提示。我尝试了一下,并获得了[Semicolon]
,[Quote]
和[BracketLeft]
的德语键盘ö
,ä
和ü
的键+布局。
这是我的工作keybindings.json
:
{ "key": "[Semicolon]", "command": "type", "args": { "text": "[" }, "when": "editorTextFocus" },
{ "key": "[Quote]", "command": "type", "args": { "text": "]" }, "when": "editorTextFocus" },
{ "key": "Shift+[Semicolon]", "command": "type", "args": { "text": "{" }, "when": "editorTextFocus" },
{ "key": "Shift+[Quote]", "command": "type", "args": { "text": "}" }, "when": "editorTextFocus" },
{ "key": "Alt+[Semicolon]", "command": "type", "args": { "text": "ö" }, "when": "editorTextFocus" },
{ "key": "Alt+[Quote]", "command": "type", "args": { "text": "ä" }, "when": "editorTextFocus" },
{ "key": "Shift+Alt+[Semicolon]", "command": "type", "args": { "text": "Ä" }, "when": "editorTextFocus" },
{ "key": "Shift+Alt+[Quote]", "command": "type", "args": { "text": "Ö" }, "when": "editorTextFocus" }
它非常适合映射的变音键,并且不会干扰常规的;
和"
键。