Prerelease This site documents an alpha of libtmux. Its structure, URLs and APIs are subject to change.

libtmux_mcp.tools.pane_tools.send_keys

Python
  • Python
  • Ruby Unavailable
  • Lua Unavailable
  • TypeScript Unavailable
  • Rust Unavailable
  • Go Unavailable
  • Java Unavailable
  • .NET Unavailable
  • C++ Unavailable
  • Swift Unavailable

API reference · Markdown

libtmux_mcp.tools.pane_tools.send_keys ( keys : str , pane_id : str | None = None , session_name : str | None = None , session_id : str | None = None , window_id : str | None = None , enter : bool = True , literal : bool = False , suppress_history : bool = False , socket_name : str | None = None ) → str
function [source]
function [source]
libtmux_mcp.tools.pane_tools.send_keys

Send keys (commands or text) to a tmux pane.

Use this for raw interactive input: TUI keys, control sequences, partial shell input, or persistent shell state. Use send_keys_batch when you need several ordered raw-input operations.

For authored shell commands that need completion, exit status, or captured output, use run_command instead. For custom completion outside that shape, compose tmux wait-for -S <channel> into the shell command and call wait_for_channel. For repeated observation after input, prefer capture_since; reserve wait_for_text for output the agent does not author.

Do NOT call capture_pane immediately — both the read and the pattern-match paths race the pane's PTY draw.

Parameters
  • keys ( str ) – The keys or text to send.

  • pane_id ( str | None ) – Pane ID (e.g. '%1').

  • session_name ( str | None ) – Session name for pane resolution.

  • session_id ( str | None ) – Session ID (e.g. '$1') for pane resolution.

  • window_id ( str | None ) – Window ID 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.

Esc

Type to search.