Skip to content

Add keyboard shortcut to move current tab to new window#1

Draft
Copilot wants to merge 2 commits into
devfrom
copilot/fix-e295ab79-5186-47c8-a495-7ff637e01d12
Draft

Add keyboard shortcut to move current tab to new window#1
Copilot wants to merge 2 commits into
devfrom
copilot/fix-e295ab79-5186-47c8-a495-7ff637e01d12

Conversation

Copilot AI commented Sep 19, 2025

Copy link
Copy Markdown

Adds a keyboard shortcut (Ctrl+Shift+N / Cmd+Shift+N) to move the current tab to a new window, addressing the functionality gap where this action was only available via the context menu "move tab > move to new window" option.

Changes

  • New Command: cmd_zenMoveTabToNewWindow that safely moves the current tab to a new window
  • Keyboard Shortcut: Ctrl+Shift+N (Windows/Linux) or Cmd+Shift+N (Mac) with automatic migration for existing users
  • Safety Checks: Prevents execution when only one tab is open or when on an empty tab
  • Preferences Integration: Appears under "Window and Tab Management" in keyboard shortcuts preferences

Technical Implementation

The implementation leverages Firefox's existing gBrowser.replaceTabWithWindow() method for reliability and follows all established Zen browser patterns:

case 'cmd_zenMoveTabToNewWindow': {
  const currentTab = gBrowser.selectedTab;
  if (currentTab && !currentTab.hasAttribute('zen-empty-tab') && gBrowser.tabs.length > 1) {
    gBrowser.replaceTabWithWindow(currentTab);
  }
  break;
}

The keyboard shortcut is automatically added to existing installations via migration version 12, ensuring all users can benefit from this feature without manual configuration.

User Experience

Users can now quickly move tabs to new windows using a keyboard shortcut, improving workflow efficiency for power users who prefer keyboard navigation over context menus. The shortcut is discoverable and customizable through the standard preferences interface.

Fixes functionality request where users wanted keyboard access to the existing "move to new window" feature that was previously only accessible via right-click context menu.


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Co-authored-by: Neo11Neo <101670176+Neo11Neo@users.noreply.github.com>
Copilot AI changed the title [WIP] I would like to add the function to open the current tab in a new window. This can already be done via the context menu move tab > move to new window but it cant be invoked by a keyboard shortcut Add keyboard shortcut to move current tab to new window Sep 19, 2025
Copilot AI requested a review from Neo11Neo September 19, 2025 18:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants