Skip to content

Instantly share code, notes, and snippets.

@oleksdovz
Created August 21, 2024 18:32
Show Gist options
  • Save oleksdovz/e619c4e0f331f6ea7a18a2f3ab323308 to your computer and use it in GitHub Desktop.
Save oleksdovz/e619c4e0f331f6ea7a18a2f3ab323308 to your computer and use it in GitHub Desktop.
VS code Keyboard Shortcuts for terminal
For macOS users, you can set the shortcut in the same keybindings.json file.
You can access the file using the shortcut cmd+shift+p, then write/select Preferences: Open Keyboard Shortcuts (JSON).
In keybindings.json, paste the following code between the square brackets:
```
{
"key": "cmd+.",
"command": "runCommands",
"when": "!terminalFocus",
"args": {
"commands": [
"workbench.action.toggleMaximizedPanel",
"workbench.action.terminal.focus"
]
}
},
{
"key": "cmd+.",
"command": "runCommands",
"when": "terminalFocus",
"args": {
"commands": [
"workbench.action.closePanel",
"workbench.action.focusActiveEditorGroup"
]
}
},
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment