Visual Studio Code - multiple keyboard shortcuts?
Is there any way to set two keyboard shortcuts for one action in VS code? For example, I want to move the cursor to the left by pressing left arrow key or Alt+A.
Edit: Starting from 1.52 it's possible from keybindings GUI:
What stops you from editing keybindings.json
?
{
"key": "left",
"command": "cursorLeft",
"when": "textInputFocus"
},
{
"key": "alt+a",
"command": "cursorLeft"
}
It can be opened from Command Palette Preferences: Open Keyboard Shortcuts (JSON)
Or by clicking the file icon from keybindings GUI page:
Updating the previous answer and adding tiny more details, atleast in the current 2020 version it seems like after changing the keybindings (atleasy cursor up & down), VSCode creates an entry in the JSON file that can be accessed from Alex's answer. The JSON will contain the new entry you made but also the changed entry with a '-' negative sign on the key instruction. Just remove the '-' negative sign and both your keybindings should work like a charm! Obviously don't forget to save!