Skip to content

feat(desktop): Add keyboard shortcuts to switch projects (Cmd+1, Cmd+2, etc.) #11837

Closed

Description

@athal7

Summary

Add keyboard shortcuts to quickly switch between open projects in the desktop app using Cmd+1 through Cmd+9 (or Ctrl+1-9 on Windows/Linux).

Use Case

When working with multiple projects open in the desktop app, users need a fast way to switch between them without using the mouse. This is a common UX pattern in:

  • VS Code (Cmd+1-9 switches editor tabs)
  • Chrome/Safari/Firefox (Cmd+1-9 switches browser tabs)
  • Terminal apps like iTerm2

Proposed Implementation

  1. Add a "Window" menu with numbered project entries (like browser tab lists)
  2. Register global shortcuts Cmd+1 through Cmd+9 to switch to projects by their order in the project list
  3. Show the shortcut hint next to each project in the menu

Technical Notes

The desktop package uses Tauri with @tauri-apps/api/menu for menu management. Shortcuts can be added via the accelerator property on MenuItem:

await MenuItem.new({
  text: "Project 1",
  accelerator: "CmdOrCtrl+1",
  action: () => switchToProject(0),
})

Acceptance Criteria

  • Cmd+1 through Cmd+9 switch to projects 1-9 respectively
  • Works on macOS (Cmd) and Windows/Linux (Ctrl)
  • Projects are ordered by most recently opened or alphabetically (TBD)
  • Menu shows current project with a checkmark
  • Shortcuts are discoverable in a "Window" or "Projects" menu

Activity

  1. github-actions commented on Feb 2, 2026

    @github-actions
    Contributor

    For keybind-related issues, please also check our pinned keybinds documentation: #4997

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

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