Skip to content

Document send a signal and send sequence picker #8579

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jul 7, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 17 additions & 1 deletion docs/terminal/advanced.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ Using mnemonics to access VS Code's menu (for example, `kbstyle(Alt+F)` for File

### Custom sequence keyboard shortcuts

The `workbench.action.terminal.sendSequence` command can be used to send a specific sequence of text to the terminal, including escape sequences that are interpreted specially by the shell. The command enables you to send Arrow keys, `kbstyle(Enter)`, cursor moves, etc.
The `workbench.action.terminal.sendSequence` command can be used to send a specific sequence of text to the terminal, including escape sequences that are interpreted specially by the shell. The command enables you to send Arrow keys, `kbstyle(Enter)`, cursor moves, and more. Run this command via the Command Palette, which allows for manual input, but it's most useful when you assign a custom keyboard shortcut with arguments.

For example, the sequence below jumps over the word to the left of the cursor (`kbstyle(Ctrl+Left)`) and then presses `kbstyle(Backspace)`:

Expand All @@ -103,6 +103,22 @@ The `sendSequence` command only works with the `\u0000` format for using charact
* [XTerm Control Sequences](https://invisible-island.net/xterm/ctlseqs/ctlseqs.html)
* [List of C0 and C1 control codes](https://github.com/xtermjs/xterm.js/blob/0e45909c7e79c83452493d2cd46d99c0a0bb585f/src/common/data/EscapeSequences.ts)

## Send a custom signal

The `workbench.action.terminal.sendSignal` command can be used to send an arbitrary signal to the foreground process in the active terminal.

For example, the below keybinding will send `SIGTERM`, causing it to terminate gracefully.

```jsonc
{
"key": "ctrl+shift+/",
"command": "workbench.action.terminal.sendSignal",
"args": {
"signal": "SIGTERM"
}
}
```

## Confirmation dialogs

In order to avoid unnecessary output and user prompts, the terminal does not show warning dialogs when processes exit. If warnings are desirable, they can be configured with the following settings:
Expand Down