libtmux_mcp.tools.pane_tools.send_keys
-
Send keys (commands or text) to a tmux pane.
Description#
Use this for raw interactive input: TUI keys, control sequences, partial shell input, or persistent shell state. Use
send_keys_batchwhen you need several ordered raw-input operations.For authored shell commands that need completion, exit status, or captured output, use
run_commandinstead. For custom completion outside that shape, composetmux wait-for -S <channel>into the shell command and callwait_for_channel. For repeated observation after input, prefercapture_since; reservewait_for_textfor output the agent does not author.Do NOT call
capture_paneimmediately — both the read and the pattern-match paths race the pane's PTY draw.- Parameters
-
-
session_name(str | None) # – Session name for pane resolution. -
session_id(str | None) # – Session ID (e.g. '$1') for pane resolution. -
enter(bool) # – Whether to press Enter after sending keys. Default True. -
literal(bool) # – Whether to send keys literally (no tmux interpretation). Default False. -
suppress_history(bool) # – Suppress shell history by prepending a space; only effective where the shell ignores space-prefixed commands. Default False. -
socket_name(str | None) # – tmux socket name.
- Returns
-
str Confirmation message.