Type text into a pane, press named keys in it, or both. text is sent literally, so C-c in it types those three characters. Use keys for anything without a character of its own — C-c to interrupt a running command, Escape, Up, C-d — which are tmux key names and are interpreted. Text, keys, and optional Enter keep that order in one tmux dispatch. Before input, the configured synchronized-pane cohort is observed; a dead, input-disabled, mode-owned, terminal-attended, or inherited-caller member refuses the whole call, and so does an active run_shell_command, except for keys C-c or C-\ sent alone, which interrupt it. Returned pane IDs describe configured membership, not confirmed delivery. The observation can race with tmux processing the input. A submitted line is remembered briefly so wait_for_text can discount its own echo; an unrecognized key stops that for the pane’s current line rather than mask it inaccurately. Send input to a pane’s program; a shell that receives it runs it with your user’s permissions.
All Rust tools · JSON · Source
Arguments
enteroptional · boolean- Whether to press Enter afterwards.
Default:
false. keysoptional · array | null- tmux key names to press, in order, after any text. These are interpreted rather than typed, which is the only way to send a key that has no character: `C-c` to interrupt, `Escape`, `Up`, `C-d`. Sending `C-c` as `text` would type those three characters. Omit to press none.
panerequired · string- The `%`-prefixed pane id.
textoptional · string | null- Text typed literally into the pane. Key names are not interpreted. Omit to type none.
Schemas
The schema defines required fields, nested values, defaults, and validation constraints.
Input schema
{ "$schema": "https://json-schema.org/draft/2020-12/schema", "additionalProperties": false, "properties": { "enter": { "default": false, "description": "Whether to press Enter afterwards.", "type": "boolean" }, "keys": { "description": "tmux key names to press, in order, after any text.\n\nThese are interpreted rather than typed, which is the only way to send\na key that has no character: `C-c` to interrupt, `Escape`, `Up`,\n`C-d`. Sending `C-c` as `text` would type those three characters.\nOmit to press none.", "items": { "type": "string" }, "type": [ "array", "null" ] }, "pane": { "description": "The `%`-prefixed pane id.", "type": "string" }, "text": { "description": "Text typed literally into the pane. Key names are not interpreted. Omit\nto type none.", "type": [ "string", "null" ] } }, "required": [ "pane" ], "type": "object"}Output schema
{ "$schema": "https://json-schema.org/draft/2020-12/schema", "properties": { "pane": { "description": "The pane the caller targeted.", "type": "string" }, "panes": { "description": "The effective configured recipient IDs observed before dispatch.\n\nMembership does not confirm delivery and may change after observation.", "items": { "type": "string" }, "type": "array" } }, "required": [ "pane", "panes" ], "type": "object"}Tool annotations
{ "destructiveHint": true, "idempotentHint": false, "openWorldHint": true, "readOnlyHint": false, "title": "Send Keys To Pane"}