Skip to content

Change agent-cycle shortcut from Cmd+. to Shift+Tab #878

Description

@jeonghun-jj-lee

Important

Problem — The agent-mode cycle shortcut (Cmd+.) collides with system/editor conventions and is not discoverable. Shift+Tab is a more natural, single-hand shortcut for rotating through modes.
Approach — Change the agent.cycle keybind from "mod+." to "shift+tab" and disable the reverse-cycle keybind (agent.cycle.reverse). Tooltips auto-update from the command registration — no UI code changes required.
Scope — in: forward-cycle keybind, reverse-cycle disable, tooltip display · out: command palette entry (unchanged), slash command /agent (unchanged), i18n strings (unchanged)

Acceptance Criteria

  • Pressing Shift+Tab anywhere in the session (including while the composer is focused) cycles the agent forward through the configured order
  • The tooltip on the agent selector displays the new shortcut (⇧Tab on macOS)
  • The reverse-cycle shortcut (Shift+Cmd+.) no longer fires
  • Cmd+. no longer cycles agents
  • The "Cycle agent" entry in the command palette shows the updated keybind

Key Decisions

  • Forward only. The reverse-cycle keybind is disabled ("none"), not removed — the command stays registered for palette/slash access. Cycling wraps, so reverse is low-value.
  • Shift+Tab, not plain Tab. Plain Tab conflicts with focus navigation; Shift+Tab is a clean modifier chord with no standing duty in the composer.

Constraints & Invariants

  • The command.tsx keydown handler's existing isTab guard already allows Tab-key shortcuts through the editable-target filter — that logic must not regress.

Prior Art

  • use-composer-commands.tsx — the command registration module in the opencode fork
  • command.tsx — the keybind parser and keydown handler (overlay)

Notes

  • Single-file change in the fork (use-composer-commands.tsx), then pnpm --filter amicode opencode:build to re-vendor.

Activity

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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions