DEV Community

Liang Wang
Liang Wang

Posted on

Custom VS Code hot key

I would like to set up my own hot key to run and to cancel current test file.

First, press ctrl K ctrl S to show the keyboard shortcuts

To set up hotkey for run current test file

  • search for "Run tests in current file" to find "testing.runCurrentFile" command
  • press "Enter" to change keybinding to your own hotkey, i.e. "Shift + Alt + R"

To set up hotkey for cancel current test file

  • search for "Cancel run" to find "testing.cancelRun" command
  • press "Enter" to change keybinding to your own hotkey, i.e. "Shift + Alt + S"

So now you can use your own hotkey to start test run and cancel test run if it hangs.

Top comments (0)