Skip to content

Conversation

nikvnt
Copy link

@nikvnt nikvnt commented Jul 13, 2025

This PR includes commits based on the feature request from #8681

It sets up custom fields for tab navigation within the 'Keyboard Shortcuts' section and also introduces a new section with two radio options under 'Tab Management'. These options allow users to decide whether they should cycle through unloaded tabs while navigating with shortcuts. Additionally, this same configuration can be bound to a shortcut for quick toggling.

I am aware someone tried to add custom shortcuts for tab navigation many months ago, but it was discontinued and unfinished, so I've made this.

I attempted to set the default shortcuts for tab cycling to 'Ctrl + Tab' and 'Ctrl + Shift + Tab', so that people who were already used to those would not have to go through the struggle of setting these manually on the custom fields. However, the 'Ctrl + Shift + Tab' combination did not function as expected. Because of that, I've decided to leave these default keybinds undefined for the time being and submit this PR for Cheff to check it out.

The l10n PR related to this is right here.

@dosubot dosubot bot added size:L This PR changes 100-499 lines, ignoring generated files. Feature labels Jul 13, 2025
@nikvnt nikvnt requested a review from mr-cheffy July 22, 2025 13:30
@SheepDomination
Copy link

Cycling though unloaded tabs and loaded tabs is not bad. I like the idea of adding shortcuts too tabs but I feel that could get messy; unless you only apply it to a few tabs.

@nikvnt
Copy link
Author

nikvnt commented Aug 7, 2025

Cycling though unloaded tabs and loaded tabs is not bad. I like the idea of adding shortcuts too tabs but I feel that could get messy; unless you only apply it to a few tabs.

We already have the default shortcuts for tab cycling in general, which are ctrl + tab and ctrl + shit + tab. My implementation here merely improves that by allowing users to customize these however they'd prefer, like explained on #8681. And also like explained there, Zen does currently cycle through unloaded and loaded tabs by default. This particular implementation gives you control over that, giving you the option to choose whether you'd like to cycle that way, or only through the ones previously loaded.

@nikvnt nikvnt requested a review from mr-cheffy September 9, 2025 11:21
Copy link
Contributor

@mr-cheffy mr-cheffy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The issue with using "key"s is that it wont take preference over the site, meaning that if a site prevents default behavior, people wont be able to switch tabs.

I still believe it should be a global preference

@nikvnt nikvnt requested a review from mr-cheffy September 11, 2025 07:51
Copy link
Contributor

@mr-cheffy mr-cheffy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

@mr-cheffy mr-cheffy self-requested a review September 16, 2025 18:22
@dosubot dosubot bot added size:XL This PR changes 500-999 lines, ignoring generated files. and removed size:L This PR changes 100-499 lines, ignoring generated files. labels Sep 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature size:XL This PR changes 500-999 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants