问题
I have my build run my application until I kill it. This works fine, but it would be nice to bind "Terminate Running Tasks" to a keyboard shortcut. Is this possible?
回答1:
All the commands are listed when you go to change a key binding, so you can add something like this to the user settings:
[
{ "key": "shift+cmd+s", "command": "workbench.action.tasks.terminate" }
]
回答2:
You could also just write exit
in the terminal and that would kill it. Just keep in mind that this might not work on everything but it's worth a try ;)
来源:https://stackoverflow.com/questions/33885264/how-to-set-a-keyboard-shortcut-to-terminate-running-task-in-vscode