Problem
The canonical simulation action ui.press forwards its key string directly to OpenTUI mockInput.pressKey. Sending { "key": "escape" } types the literal word escape into the focused input instead of dispatching Escape.
This broke the OpenCode UI catalog after closing the command palette: the next slash command was entered into the still-open palette as escape/models.
Reproduction
- Launch a simulated TUI through OpenCode Drive.
- Open the command palette with
ui.press for Ctrl+P.
- Send
ui.press with key: "escape".
- Capture the terminal frame.
The palette remains open and its search contains escape.
Sending the raw escape byte "\u001b" works, but callers should not need transport-level key encoding for the protocol’s named key operation.
Expected
Named special keys such as escape are translated to the corresponding OpenTUI input event, with coverage for the canonical frontend simulation protocol.
Problem
The canonical simulation action
ui.pressforwards itskeystring directly to OpenTUImockInput.pressKey. Sending{ "key": "escape" }types the literal wordescapeinto the focused input instead of dispatching Escape.This broke the OpenCode UI catalog after closing the command palette: the next slash command was entered into the still-open palette as
escape/models.Reproduction
ui.pressfor Ctrl+P.ui.presswithkey: "escape".The palette remains open and its search contains
escape.Sending the raw escape byte
"\u001b"works, but callers should not need transport-level key encoding for the protocol’s named key operation.Expected
Named special keys such as
escapeare translated to the corresponding OpenTUI input event, with coverage for the canonical frontend simulation protocol.