Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
289 views
in Technique[技术] by (71.8m points)

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.

question from:https://stackoverflow.com/questions/45383882/visual-studio-code-multiple-keyboard-shortcuts

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

Edit: Starting from 1.52 it's possible from keybindings GUI:

keybindings gui context menu add keybinding


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:

enter image description here


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...