Repository navigation
no-bug: Add Tab Switcher settings and remappable tab switching shortcuts - #16324
Open
tylertylerday wants to merge 1 commit into
Open
tylertylerday wants to merge 1 commit into
tylertylerday wants to merge 1 commit into
Conversation
Author
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


Discussion: #10336
Ctrl+Tab, Ctrl+Page Down and Ctrl+Page Up are handled by Firefox in
ShortcutUtils.getSystemActionForEventrather than through<key>elements, so they can't be changed in about:keyboard. This adds disabled<key>elements that only hold their bindings (zen-tab-switcher-cycle,-nextand-previous), so they show up in about:keyboard like any other shortcut. Until one is customized, Firefox's built-in shortcuts apply unchanged, including the macOS variants. Once it is,ZenKeyboardShortcuts.getSystemActionForEventmatches the new binding intabbox.jsandbrowser-ctrlTab.js, and the built-in one stops working. When cycling in recently used order, the panel picks a tab when the custom shortcut's modifier is released, and Shift still goes backwards unless the shortcut uses Shift itself.In about:keyboard, these three are in a new Tabs category right after Navigation, together with Firefox's Select Tab 1–8 and Select Last Tab, which move there from Navigation.
Settings → Tab Management gets a Tab Switcher section with the Ctrl+Tab options: Firefox's "recently used order" checkbox (moved from General), the existing pending and essential tab options, and a new option to cycle through the tabs of every space instead of only the current one (
zen.tabs.ctrl-tab.cross-space, off by default). Picking a tab from another space switches to that space. The labels show the current shortcut, and the description links to Keyboard Shortcuts. Because those strings now take the shortcut as a variable, they have new Fluent IDs.Tested on a local Linux build. I added browser tests for remapping, clearing and resetting the shortcuts, the about:keyboard category, and cross-space cycling. The
kbs,browser_ctrl_tab_cross_space.jsandbrowser_tabs_cycle_by_attribute.jstests pass, andnpm run lintis clean.