Skip to content

fix(app): Escape in macOS prompt input bubbles to abort/fullscreen #13962

@itskritix

Description

@itskritix

Description

In the macOS desktop app, pressing Escape while the prompt input is focused triggers higher-level handlers. This can stop a running agent and also exit fullscreen. Escape inside the input should be handled locally first.

Plugins

None

OpenCode version

Current dev branch (e35a4131d)

Steps to reproduce

  1. Open the desktop app on macOS and enter fullscreen.
  2. Focus the prompt input.
  3. Start a running agent response.
  4. Press Escape with the cursor still in the prompt input.

Expected behavior

Escape in the prompt input should resolve the nearest input state first (close popover, exit shell mode, stop agent if running, blur when idle) and should not also trigger fullscreen exit from the same keypress.

Actual behavior

The same Escape keypress propagates beyond the prompt input, stopping the agent and potentially exiting fullscreen.

Screenshot and/or share link

Provided in local repro discussion.

Operating System

macOS

Terminal

N/A (desktop app)

Metadata

Metadata

Assignees

Labels

webRelates to opencode on web / desktop

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions