# libtmux_mcp.tools.pane_tools.send_keys_batch

- **Module:** libtmux_mcp.tools.pane_tools
- **Package:** libtmux-mcp
- **Language:** Python
- **Kind:** function
- **Source:** https://github.com/tmux-python/libtmux-mcp/blob/4daddc0dfca96c43bf521d818bf91564e1434760/src/libtmux_mcp/tools/pane_tools/io.py#L174
- **Page:** https://libtmux.org/en/py/stable/mcp/reference/libtmux_mcp-tools-pane_tools-send_keys_batch/

```
libtmux_mcp.tools.pane_tools.send_keys_batch(
    operations: list[SendKeysOperation],
    on_error: t.Literal["stop", "continue"] = "stop",
    timeout: float | None = None,
    socket_name: str | None = None,
) -> SendKeysBatchResult
```

Send an ordered batch of raw key/text operations to tmux panes.

Use this for bulk TUI or persistent-shell input where each item is the
same kind of low-level terminal interaction as
:func:`~libtmux_mcp.tools.pane_tools.send_keys`. For authored shell
commands that need exit status and captured output, use
:func:`~libtmux_mcp.tools.pane_tools.run_command` instead. For
repeated observation after sending input, use
:func:`~libtmux_mcp.tools.pane_tools.capture_since` with its returned
cursor.

This tool intentionally does not compose heterogeneous operations such
as send → wait → capture. Keeping the batch homogeneous preserves clear
per-operation error attribution and avoids embedding a workflow DSL in
the MCP tool surface.

## Parameters

- `operations` (`list[SendKeysOperation]`): Ordered raw-input operations to send.
- `on_error` (`t.Literal["stop", "continue"]`): Whether to stop at the first failed operation or keep attempting
later operations. Default "stop".
- `timeout` (`float | None`): Maximum time in seconds to allow the batch to run before aborting.
- `socket_name` (`str | None`): tmux socket name.

## Returns

SendKeysBatchResult
    Per-operation results with success/error counts and stop index.
