Skip to content

desktop: toggle-terminal shortcut opens the terminal but leaves focus in the prompt box #57536

Closed

Description

@okbytes

Summary

In the desktop app, the toggle-terminal shortcut opens the terminal but leaves keyboard focus in the prompt box, so whatever you type next lands in the prompt instead of the terminal.

Environment

  • opencode version: Desktop 2.1.1 (ai.opencode.desktop)
  • OS: macOS, Darwin 27.0.0 arm64
  • Terminal: Built-in desktop terminal panel
  • Shell: /bin/zsh
  • Install/channel: latest
  • Active plugins: None (no plugins or keybind overrides in ~/.config/opencode/opencode.jsonc)

Reproduction

  1. Open a session in the desktop app with the cursor in the prompt box.
  2. Press the toggle-terminal shortcut once.
  3. Start typing.

Expected Behavior

Opening the terminal moves focus into it, so keystrokes go to the shell.

Actual Behavior

The terminal opens, but focus stays in the prompt box and keystrokes are typed into the prompt.

Additional Context

Activity

  1. opencode-agent commented on Oct 20, 2026

    @opencode-agent
    Contributor

    Thanks for the clear report, @okbytes. I couldn't reproduce this here: it needs the macOS desktop app, and this sandbox only runs Linux. On macOS the toggle-terminal shortcut goes through the app's native View menu instead of the in-page key handler the web UI uses, so testing it in a browser wouldn't be the same path. The code clearly means to focus the terminal when it opens, so this needs a maintainer with a Mac to confirm. One thing that would help: does choosing View → Toggle Terminal from the menu bar with the mouse behave the same way as the shortcut?

    Related: #55992 (terminal left unfocused after rapid toggling in the web UI, a different trigger).

  2. okbytes commented on Oct 21, 2026

    @okbytes
    Author

    Same exact issue in menu bar triggering. Of note, this is explicitly when the focus is in the prompt box. I opened an old thread to test this and hadn't clicked into the prompt box and the menu bar trigger put the focus in there correctly.

  3. Tarquinen commented on Oct 26, 2026

    @Tarquinen
    Member

    This was fixed by #57980. That PR merged into the beta branch, so GitHub didn't close this issue automatically. The fix will be in the next release. Closing as completed.

    — from 𝕺𝖕𝖊𝖓𝕮𝖔𝖉𝖊

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions