Send keys batch¶
send_keys_batch¶
Send an ordered batch of raw key/text operations to tmux panes.
- Returns:
Use when you need to send several ordered raw-input operations to one or more panes: TUI keystrokes, partial shell input, or persistent shell interaction that should remain below the command-completion layer.
Avoid when you need to run shell commands and capture results —
use run_command for authored commands, or combine
send_keys with capture_since when later
observation is intentionally separate from input.
Side effects: Sends keystrokes to target panes in order. With
on_error="stop" the batch stops at the first failed operation and
returns that failure in the result. With on_error="continue" later
operations are still attempted.
Example:
{
"tool": "send_keys_batch",
"arguments": {
"operations": [
{"pane_id": "%2", "keys": "C-c", "enter": false},
{"pane_id": "%2", "keys": "npm run dev"}
],
"on_error": "stop"
}
}
Response:
{
"results": [
{
"index": 0,
"pane_id": "%2",
"success": true,
"error": null,
"elapsed_seconds": 0.01
},
{
"index": 1,
"pane_id": "%2",
"success": true,
"error": null,
"elapsed_seconds": 0.01
}
],
"succeeded": 2,
"failed": 0,
"stopped_at": null
}
Parameters
Parameter |
Type |
Required |
Default |
Description |
|---|---|---|---|---|
|
yes |
— |
Ordered raw-input operations to send. |
|
|
|
no |
|
Whether to stop at the first failed operation or keep attempting later operations. Default “stop”. One of: |
|
no |
— |
Maximum time in seconds to allow the batch to run before aborting. |
|
|
no |
— |
tmux socket name. |