Switch between multiple tabs with CTRL + PGUP/PGDOWN #12555

Closed
opened 2026-01-31 03:18:39 +00:00 by claunia · 3 comments
Owner

Originally created by @zetric on GitHub (Feb 13, 2021).

Description of the new feature/enhancement

I can add the following to my config to allow switching tabs with CTRL+PGUP/PGDOWN

{ "command": "nextTab", "keys": "ctrl+pagedown" },
{ "command": "prevTab", "keys": "ctrl+pageup" }

If I e. g. press CTRL+PGDOWN and release CTRL, this works fine for one tab. But If I want to switch between multiple tabs like e. g. in webbrowsers, this does not work as expected. If I keep CTRL pressed and press e. g. PGDOWN a second time, the focus changes to the last tab in the list instead of the next one.
The same applies for the other direction with CTRL+PGUP.

In the attached video, you see the following sequences:
CTRL+PGDOWN+PGDOWN
CTRL+PGUP+PGUP

https://user-images.githubusercontent.com/39863610/107854617-483d0e80-6e1d-11eb-9643-fa09547892c2.mp4

It would be fine if I could switch tabs in Windows Terminal like I am used from other applications.

Originally created by @zetric on GitHub (Feb 13, 2021). <!-- 🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨 I ACKNOWLEDGE THE FOLLOWING BEFORE PROCEEDING: 1. If I delete this entire template and go my own path, the core team may close my issue without further explanation or engagement. 2. If I list multiple bugs/concerns in this one issue, the core team may close my issue without further explanation or engagement. 3. If I write an issue that has many duplicates, the core team may close my issue without further explanation or engagement (and without necessarily spending time to find the exact duplicate ID number). 4. If I leave the title incomplete when filing the issue, the core team may close my issue without further explanation or engagement. 5. If I file something completely blank in the body, the core team may close my issue without further explanation or engagement. All good? Then proceed! --> # Description of the new feature/enhancement I can add the following to my config to allow switching tabs with `CTRL+PGUP/PGDOWN` ``` { "command": "nextTab", "keys": "ctrl+pagedown" }, { "command": "prevTab", "keys": "ctrl+pageup" } ``` If I e. g. press `CTRL+PGDOWN` and release `CTRL`, this works fine for one tab. But If I want to switch between multiple tabs like e. g. in webbrowsers, this does not work as expected. If I keep `CTRL` pressed and press e. g. `PGDOWN` a second time, the focus changes to the last tab in the list instead of the next one. The same applies for the other direction with `CTRL+PGUP`. In the attached video, you see the following sequences: `CTRL+PGDOWN+PGDOWN` `CTRL+PGUP+PGUP` https://user-images.githubusercontent.com/39863610/107854617-483d0e80-6e1d-11eb-9643-fa09547892c2.mp4 It would be fine if I could switch tabs in Windows Terminal like I am used from other applications.
claunia added the Issue-FeatureNeeds-TriageNeeds-Tag-Fix labels 2026-01-31 03:18:39 +00:00
Author
Owner

@vefatica commented on GitHub (Feb 13, 2021):

You're keybindings work perfectly here. Here's several PGDNs while holding Ctrl. With PGUP, they go in the other order. I have

Microsoft Windows 10 Pro for Workstations
10.0.19042.804 (2009, 20H2)
WindowsTerminalPreview_1.6.10412.0_x64

https://user-images.githubusercontent.com/61856645/107860108-816c8300-6e0b-11eb-8690-080350e5ddcd.mp4

@vefatica commented on GitHub (Feb 13, 2021): You're keybindings work perfectly here. Here's several PGDNs while holding Ctrl. With PGUP, they go in the other order. I have ``` Microsoft Windows 10 Pro for Workstations 10.0.19042.804 (2009, 20H2) WindowsTerminalPreview_1.6.10412.0_x64 ``` https://user-images.githubusercontent.com/61856645/107860108-816c8300-6e0b-11eb-8690-080350e5ddcd.mp4
Author
Owner

@vefatica commented on GitHub (Feb 14, 2021):

@zetric, I finally figured out what was going on in your video. It seems you have TabSwitcher turned on. If you want your key bindings to switch tabs as in a browser (i.e., without showing the tab switcher window), you can use either or both (I believe) of these at the top level in your settings. I think they will then work as you desire.

    "tabSwitcherMode": "disabled",
    "useTabSwitcher": false
@vefatica commented on GitHub (Feb 14, 2021): @zetric, I finally figured out what was going on in your video. It seems you have TabSwitcher turned on. If you want your key bindings to switch tabs as in a browser (i.e., without showing the tab switcher window), you can use either or both (I believe) of these at the top level in your settings. I think they will then work as you desire. ``` "tabSwitcherMode": "disabled", "useTabSwitcher": false ```
Author
Owner

@zetric commented on GitHub (Feb 14, 2021):

@vefatica That was it! Thank you for your very quick analysis and solution!

    "tabSwitcherMode": "disabled",
    "useTabSwitcher": false

This makes sense. The TabSwitcher shows a list. And if you press the PG keys, the behavior is like expected in such lists: It goes one "page" up/down. Without the switcher, it works as desired. Perfect! Again an optimization of the workflow for me as keyboard enthusiast.

Have a great day!

@zetric commented on GitHub (Feb 14, 2021): ✅@vefatica That was it! Thank you for your very quick analysis and solution! ``` "tabSwitcherMode": "disabled", "useTabSwitcher": false ``` This makes sense. The TabSwitcher shows a list. And if you press the PG keys, the behavior is like expected in such lists: It goes one "page" up/down. Without the switcher, it works as desired. Perfect! Again an optimization of the workflow for me as keyboard enthusiast. Have a great day!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#12555