Skip to content

Rebindable keyboard shortcuts for back and forward navigation (Mod+[ / Mod+]) #3711

Closed

Description

@benwaffle

Workflow

I move between threads, plugin pages, and settings many times an hour. The sidebar has back and forward history buttons (SidebarHistoryNavigationControls), but they are mouse-only. Every browser and editor I use binds history navigation to Cmd+[ / Cmd+] on macOS (Ctrl+[ / Ctrl+] elsewhere), and my hands keep reaching for it in bb.

Current behavior

useRouteStateHistoryNavigation and the sidebar buttons exist:

const handleBack = useCallback(() => {
if (!canGoBack) {
return;
}
goBack();
onNavigate?.();
}, [canGoBack, goBack, onNavigate]);
const handleForward = useCallback(() => {
if (!canGoForward) {
return;
}
goForward();
onNavigate?.();
}, [canGoForward, goForward, onNavigate]);

No history.* command id exists in the rebindable registry, so there is nothing to bind in Settings → Keyboard and nothing to run from the palette:

export const APP_COMMAND_IDS = [

The desktop menu has no accelerator for it either.

Expected

Two core app commands, history.back and history.forward, with default shortcuts Mod+[ and Mod+], that:

  • appear in Settings → Keyboard, the quick palette, and bb settings keyboard, and are rebindable like every other core command;
  • are excluded while a modal is open or while an editable field, the terminal, or the embedded browser has focus, so typing [ in the composer, a terminal, or a web page is never intercepted;
  • decline when there is no history entry in that direction, so the key keeps its native behavior instead of swallowing the press;
  • are registered in the app command registry rather than as an Electron accelerator, so the editable-focus guard actually holds (a menu accelerator fires before the renderer sees the key);
  • expose the resolved chord on the sidebar buttons through aria-keyshortcuts.

Prototype

I have this working on my fork on branch bi/back-forward-shortcuts (head 5784d066c, 10 files, about 250 lines including a 180-line handler test). The change touches packages/domain/src/app-keybindings.ts, apps/server/src/services/system/app-keybindings.ts, apps/app/src/lib/app-command-metadata.ts, a new HistoryNavigationCommandHandler mounted from AppLayout, the sidebar controls, and the docs and CLI skill references for the two new command ids. I can push it and open a PR if the design above is acceptable, or adjust the defaults first if Mod+[ conflicts with something planned.

Versions

  • upstream/main at 33c1564e5e49499f3baef7da5dbf112b876d153f
  • macOS 26.6, desktop app 0.43.1

AGENT GENERATED

Activity

  1. added
    ui
    on Sep 15, 2026
  2. bb-slop-cop commented on Sep 15, 2026

    @bb-slop-cop
    Contributor

    🚨 SLOP COP 🚨 · new-issue-autopilot

    Applied Type Feature, Priority Low, Effort Medium, and label ui. All were previously unset; final values verified.

    This adds keyboard navigation behavior, with existing sidebar buttons providing a workaround. Implementation spans command registration, focus handling, and shortcut presentation. No report or pull request: the rule skips reproduction and fixes for non-bugs.

  3. benwaffle commented on Sep 15, 2026

    @benwaffle
    Author

    Permalinks for the fork implementation described above:

    • benwaffle@befd398 (Let the history shortcuts fire from the composer and other text fields)
    • benwaffle@3a77d43 (Add Mod+[ and Mod+] shortcuts for app back and forward navigation)

    AGENT GENERATED

  4. ymichael commented on Oct 8, 2026

    @ymichael
    Collaborator

    Fixed by #4897: ⌘[ / ⌘] now go back and forward, and both are rebindable.

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

    ui

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions