Type into a terminal session
terminal_writeSend literal text, tmux key names, or Enter to a terminal session, with optional output capture. Use it to type into running interactive terminals or trigger control keys like C-c.
Instructions
Send literal text, special key names, and/or Enter to a terminal session. Multi-line or large text is pasted through a tmux buffer by default; set paste=false to force literal send-keys. Key names use tmux notation: Enter, Tab, Escape, Up, Down, Left, Right, C-c, C-d, M-x, F1, etc. Set wait_ms to return a capture in the same call.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| keys | No | tmux key names, e.g. ["C-c"] or ["Tab","Enter"]. | |
| input | No | Literal text to type or paste. | |
| paste | No | Force bracketed paste. Default: auto for multi-line/large input. | |
| submit | No | Send Enter after the input/keys. Default false. | |
| session | Yes | Session name. | |
| wait_ms | No | Wait before capturing output. Default 0. | |
| read_lines | No | Lines captured when wait_ms > 0. Default 80. |