1. Open the Keyboard Shortcuts menu
Ctrl+K Ctrl+S
This opens the full keybinding editor.
Note: we can also go to File -> Preferences -> Keyboard shortcuts
2. Search for the command we want to change
Use the search bar at the top and type the command name, for example:
Graphviz: Show Preview
or any other command we want to rebind.
3. Click the pencil icon
On the right side of the command row, click the pencil icon to edit the shortcut.
4. Press the new keybinding
VS Code enters “listening mode.”
Press the shortcut you want to assign, such as: e.g
Ctrl+Alt+G
5. Confirm the overwrite
If the shortcut is already used, VS Code will show a conflict message.
Click Yes to overwrite the existing keybinding.
6. (Optional) Edit the JSON directly
If you prefer manual control:
- Press Ctrl+Shift+P
- Search:
Open Keyboard Shortcuts (JSON) - Add your override:
json
{
"key": "ctrl+alt+g",
"command": "graphviz.showPreview"
}
This always overrides the default.
