Step 1: install the multicommand extension: ryuta46.multi-command https://marketplace.visualstudio.com/items?itemName=ryuta46.multi-command
Step 2: add to settings.json:
"multiCommand.commands": [
{
"command": "multiCommand.runInBothTerminals",
"interval": 30,
"sequence": [
"workbench.action.terminal.runSelectedText",
"workbench.action.terminal.focusNextPane",
"workbench.action.terminal.runSelectedText",
]
}
],
step 3: add to keybindings.json:
{
"key": "ctrl+shift+enter",
"command": "extension.multiCommand.execute",
"args": {
"command": "multiCommand.runInBothTerminals"
},
"when": "editorTextFocus"
},
just press ctrl shift enter