Skip to content

no-bug: Add keyboard shortcuts to move tabs between workspaces#13668

Open
kristof-nyr wants to merge 2 commits into
zen-browser:devfrom
kristof-nyr:feat/keybind-move-tab-to-workspace
Open

no-bug: Add keyboard shortcuts to move tabs between workspaces#13668
kristof-nyr wants to merge 2 commits into
zen-browser:devfrom
kristof-nyr:feat/keybind-move-tab-to-workspace

Conversation

@kristof-nyr
Copy link
Copy Markdown

Summary

Adds 12 new keyboard shortcuts to move the active (or multiselected) tabs to a specific workspace or to the next/previous workspace.

Addresses community requests in:

What's included

  • Commands: 12 new <command> elements in zen-commands.inc.xhtml
  • Move logic: shortcutMoveTabTo(index) and moveActiveTabShortcut(offset)
    in ZenSpaceManager.mjs; empty tabs (zen-empty-tab) are filtered out to
    prevent moving placeholder tabs
  • Feedback: Toast notification ("Moved tab to [name]" / "Moved N tabs to
    [name]") using existing gZenUIManager.showToast; the toast container's ARIA
    live region provides screenreader announcements automatically
  • Shortcuts: Registered in ZenKeyboardShortcuts.mjs with migration to
    version 19; extracted shared createMoveTabShortcuts() factory so fresh-install
    and migration paths cannot diverge
  • Defaults: Ctrl+Shift+1..0 on macOS (mirrors Ctrl+1..0 for switching);
    unbound on other platforms
  • Tests: 10 mochitest tasks covering single move, multiselect, wrap/no-wrap,
    same-workspace guard, empty-tab fallback, and toast verification

Design decisions

Behavioral note for reviewers

In zen-sets.js, the default case was reordered: workspace-switch and
move-tab commands are now checked before gZenGlanceManager.handleMainCommandSet().
Previously the glance manager saw all default-case commands including workspace
switches. The new order only passes truly unrecognized commands to the glance
manager. This is more correct (workspace commands aren't glance-related) but
reviewers should confirm the glance manager doesn't depend on seeing those events.

Signed-off-by: Kristof Nyari <nyari.kristof66@gmail.com>
Signed-off-by: Kristof Nyari <nyari.kristof66@gmail.com>
@kristof-nyr kristof-nyr requested a review from mr-cheffy as a code owner May 12, 2026 13:46
@dosubot dosubot Bot added size:L This PR changes 100-499 lines, ignoring generated files. Feature labels May 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Feature size:L This PR changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant