keyboard-shortcutsvscode-keybinding

How to create a keyboard shortcut in Visual Studio Code to move the cursor


Regarding Visual Studio Code shortcuts: What is the command Id to move the cursor one space to the right? This way I could create a key binding to accomplish this command.


Solution

  • The command you're looking for is cursorRight. This is an example of a key binding with this functionality:

    { "key": "ctrl+r", "command": "cursorRight", "when": "editorTextFocus" }
    

    You can change the value of "key" and copy-paste the line in the keybindings.json file to override the default value for that key(s). Also adjust the attribute "when" to your needs.