有没有办法在 VS 代码中为一个操作设置两个键盘快捷键?例如,我想通过按左箭头键或 Alt+A 将光标向左移动。
最佳答案
Edit: Starting from 1.52 it's possible from keybindings GUI:
![keybindings gui context menu add keybinding](https://i.sstatic.net/H5CVb.png)
是什么阻止你编辑
keybindings.json
?{
"key": "left",
"command": "cursorLeft",
"when": "textInputFocus"
},
{
"key": "alt+a",
"command": "cursorLeft"
}
它可以从命令面板 Preferences: Open Keyboard Shortcuts (JSON)
打开或者通过单击键绑定(bind) GUI 页面中的文件图标:
![enter image description here](https://i.sstatic.net/KzWNR.png)
关于visual-studio-code - Visual Studio Code - 多个键盘快捷键?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45383882/