send_keys
Send key names or text to a serial device to control interactive programs—interrupt stuck commands with Ctrl-C, navigate menus with arrows/Tab, or send function keys. Useful where plain text input is insufficient.
Instructions
Press keys by name, encoded the way a VT100/xterm terminal sends them.
Use it for what send_text can't type: Ctrl-C to interrupt a running command (ping, monitor, a stuck process), Ctrl-Z, Esc, Tab (completion), arrows (history, menus), Enter alone, function keys, Page Up/Down. Each item is a key name ("ctrl-c", "esc", "tab", "enter", "up", "down", "left", "right", "home", "end", "pgup", "pgdn", "backspace", "delete", "f1".."f12", "space"), a single character, or "text:..." for a literal run. Nothing is read; follow with read_until_prompt, read_available, or screen.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| keys | Yes | ||
| connection | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |