Skip to content

Conversation

normaltaro
Copy link

@normaltaro normaltaro commented Dec 11, 2024

Added 2 shortcuts for tab navigation.

  1. Switching to Next Tab (Unbounded by default)
  2. Switching to Previous Tab (Unbounded by default)

Using extensions such as Tridactyl or Vimium to do this stops working on protected pages such as New Tab, Settings, etc and breaks the flow. But this keyboard shortcut will work on any opened tab. It is a better user experience to those who really like the keyboard.
Relevant Issue: #1678

I know English. I have submitted the relevant PR to the l10n repo: zen-browser/l10n-packs#110

@dosubot dosubot bot added size:S This PR changes 10-29 lines, ignoring generated files. Feature labels Dec 11, 2024
@normaltaro normaltaro changed the title Shortcuts for Tab Navigation Prev/Next Shortcuts for Next/Prev Tab Navigation Dec 11, 2024
@mr-cheffy
Copy link
Member

Great!

But we'll need to disable the other shortcuts.. Ill do that when I get home and ill merge

Copy link
Member

@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.

Could you update LATEST_KBS_VERSION?

@normaltaro
Copy link
Author

done

@normaltaro normaltaro requested a review from mr-cheffy December 12, 2024 14:08
@normaltaro
Copy link
Author

normaltaro commented Dec 16, 2024

do i move LATEST_KBS_VERSION to 6?

@goosethedev
Copy link

Any updates on this? 👀

@mr-cheffy
Copy link
Member

Any updates on this? 👀

This ended up being not as easy as it looks... Im still investigating

@KorigamiK
Copy link

If anyone wants a workaround to get this feature you can try out my hotkeys config in the meantime which works good for me:

https://github.com/KorigamiK/zen-conf/blob/main/chrome/JS/hotkeys.uc.js

@Esyriz
Copy link

Esyriz commented Jan 22, 2025

If anyone wants a workaround to get this feature you can try out my hotkeys config in the meantime which works good for me:

https://github.com/KorigamiK/zen-conf/blob/main/chrome/JS/hotkeys.uc.js

I wasn't able to make this work but I used karabiner elements complex modifications instead to bind the keys i wanted to ctrl+tab and ctrl+shift+tab

{
    "description": "next/previoustab",
    "manipulators": [
        {
            "from": { "key_code": "f2" },
            "to": [
                {
                    "key_code": "tab",
                    "modifiers": "control"
                }
            ],
            "type": "basic"
        },
        {
            "from": { "key_code": "f1" },
            "to": [
                {
                    "key_code": "tab",
                    "modifiers": ["shift", "control"]
                }
            ],
            "type": "basic"
        }
    ]
}

@KorigamiK
Copy link

I wasn't able to make this work but I used karabiner elements complex modifications instead to bind the keys

Ah, nice although it's macos only

@pbogut
Copy link

pbogut commented Feb 10, 2025

If anyone wants a workaround to get this feature you can try out my hotkeys config in the meantime which works good for me:

https://github.com/KorigamiK/zen-conf/blob/main/chrome/JS/hotkeys.uc.js

@KorigamiK
Does it need to be enabled somehow in zen in order to work? I've put file in place, cleared startup cache but it doesn't look like file is loaded at all. Cheers.

@KorigamiK
Copy link

If anyone wants a workaround to get this feature you can try out my hotkeys config in the meantime which works good for me:
https://github.com/KorigamiK/zen-conf/blob/main/chrome/JS/hotkeys.uc.js

@KorigamiK Does it need to be enabled somehow in zen in order to work? I've put file in place, cleared startup cache but it doesn't look like file is loaded at all. Cheers.

No, you don't need to enable anything just place the files in the right locations.
See the docs here which explains how to install fx-autoconfig, for me on linux using zen the directory path is /opt/zen-browser-bin/defaults but it might be different for you.

then you paste my script https://github.com/KorigamiK/zen-conf/blob/main/chrome/JS/hotkeys.uc.js into chrome/JS/hotkeys.uc.js in your profile folder.

@dredstone1
Copy link

Any updates?

@tommerty
Copy link

tommerty commented Mar 27, 2025

These keybinds were initially here when I first discovered Zen many months ago, what caused the regression and the difficult re-implementation?

@wave84
Copy link

wave84 commented Apr 12, 2025

I'm also curious to know what's the issue here, this seemed like a simple change and at one point it worked fine, until it got removed.

@Ethnical
Copy link

Up what we need to make this PR merged @mr-cheffy ?

@prwlr
Copy link

prwlr commented Sep 7, 2025

Been following this issue quite closely for a while now. Not having this really breaks navigation with keyboard, especially once one includes PDF-viewer tabs, which Vimium can't navigate among. What contributions are currently missing @mr-cheffy ?

@kikefdezl
Copy link

I must +1 this feature

I need to be able to remap Next/Previous tab cycling. The existing shortcuts:

  • PgUp/PgDown are not available on some compact keyboards
  • Ctrl+Tab and Ctrl+Shift+Tab are awkward to press

@normaltaro
Copy link
Author

I have not been using this browser since many months. I am glad and a bit overwhelmed to see such enthusiasm from so many people who are in support of this simple, yet extremely handy feature for keyboard-first users. I am not a legit programmer, though I wish to be.

From my understanding this browser code is a framework of patches onto firefox source code, like librewolf. I once browsed the firefox source code for nexttab and found this one easy ready to use function called advanceSelectedTab().

I guessed that it might work with zen browsers codebase since I felt it lived in the same 'source-build scope' and I tried it.

It worked ok back then and I made this request. Another guy before me also made a request for this feature, and it wasnt merged. I cant recall why. I thought mine would be since the browser was in a very alpha state and changes I made were too tiny, not interfering with any development code. I should have referenced it when I posted this.

I think this wont be merged since the developers of the browser probably want to use their own 'framework' intead of this hacky one liner approach which directly calls a firefox internal browser function.

I do know a bit more programming now so I could try again to make a more 'real' patch with more consideration to workspace and split views behavior.
I might try again after I wake up today/tomorrow. No guarantees.

I will keep this request open since many people support it. Anyone is free to work on this feature and should not wait for me or this request.

I think should have sent this earlier but I am not too familiar with open source (or good at life in general). I am sorry.

@mr-cheffy
Copy link
Member

This should be moved into this newly created PR: #9441

The issue is mostly about how we should handle shortcuts and their precedence. It would be annoying if you tried to ctrl+tab and sites like github blocked that logic, right? So instead of using the firefox key management, we should be doing our own one. This is what firefox has done and why its hard coded. This however will be fixed very soon by disabling firefox's implementation and adding our own one that supports dynamic shortcuts.

@mr-cheffy mr-cheffy closed this Sep 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Feature size:S This PR changes 10-29 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.