Send a keystroke to the shell
Keycaps for the keys a phone keyboard does not offer: Tab, Esc, ↑, ↓,
^C, ^L, ⏎ and ^D. Each one types into the tab's terminal.
Why you would use it
A soft keyboard has no Escape and no Ctrl. A command is running and you want to stop it. A prompt is waiting for a key. The last command needs recalling with the up arrow. None of these is a character you can type.
How to use it
Switch to Shell. On a phone, an Android tablet or an iPad, the two-row keypad (
#tray-keys) stays visible in the bottom band while Shell mode is selected. Its keycaps readTab,Esc,↑,↓,^C,^L,⏎and^D.
Tap a key. It reaches the shell as if typed on a keyboard, in order with the keys around it. A tap does not close the phone's keyboard, so you can type a line, tap
Tabto complete it and carry on typing.
What you see
- The keypad is hidden in Agent mode and visible in Shell mode on a touch screen. On a wide screen, it follows the focused pane's mode.
- A computer driven by a mouse or trackpad has a real keyboard, so it shows no keypad. A laptop with a touch screen counts as a computer.
- What the key did shows in the terminal:
^Cand a new prompt, the screen cleared by^L, the previous command after↑. No toast confirms a key. - If the box has no shell, a toast says why:
tmux is not installed, so there is no shell here. Install it with: <command>, or a line beginningshell unavailable:. - The keys are drawn as raised keycaps. Each key's accessible name is its tmux
name (
C-c,Escape,Up), so a screen reader saysC-cfor^C. - The jump-to-latest pill is hidden while the keypad is visible.
Options and settings
| Option | Default | What it changes |
|---|---|---|
VCODE_SHELL_SESSION |
v-code-shell (-prod in the installed unit) |
The tmux session the keys reach |
Limits and known gaps
- Each button goes to the shell, never to the agent. There is no way to send a raw keystroke to a running agent turn.
- The keypad's key list is fixed. There is no way to add a key.
- With no tmux the key goes nowhere and the toast says so.
Related
- shell-mode: the terminal these keys reach
- edit-the-command-line: the line
↑andTabfill - bang-command: one command, answered in the transcript instead
- floating-chrome: where the keypad sits
- wide-layout: how the keypad follows the focused pane
- toasts: the message when there is no shell
- stop-a-running-turn: the agent's stop, which these keys are not
- agent-or-shell-mode: choosing the shell mode for these keys