terminal.press
Input key combinations into a terminal session to control interactive programs.
Instructions
Press a key or key combination in the terminal. Supports arbitrary key expressions: basic keys (enter, tab, escape, up, down, f1-f12), ctrl combos (ctrl+a through ctrl+z), alt combos (alt+enter), shift combos (shift+tab), and multi-modifier combos (ctrl+shift+f). Legacy hyphenated format (ctrl-c) still works.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sessionId | Yes | Session ID from terminal.start — use exact value | |
| key | Yes | Key expression. Examples: "enter", "ctrl+a", "ctrl+p", "alt+enter", "shift+tab", "f1", "ctrl+f1". Legacy format "ctrl-c" also works. Use terminal.keys to see common key names. |