Bug 506333 - Make switching tabs with Alt+Number the default
Summary: Make switching tabs with Alt+Number the default
Status: RESOLVED FIXED
Alias: None
Product: okular
Classification: Applications
Component: general (other bugs)
Version First Reported In: 25.04.2
Platform: Other Linux
: NOR wishlist
Target Milestone: ---
Assignee: ajay
URL:
Keywords: junior-jobs
: 502516 (view as bug list)
Depends on:
Blocks:
 
Reported: 2025-06-29 05:27 UTC by D. Debnath
Modified: 2026-02-08 16:24 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description D. Debnath 2025-06-29 05:27:14 UTC
Important applications like Firefox, Chromium, as well as core KDE applications like Konsole and Dolphin have default behaviour of switching tabs with Alt+{0...9}. These actions are defined with "Go to Tab {0...9}" and set to shortcuts of Alt+{0...9} by default.

Okular currently not only doesn't have this default behaviour, it isn't even possible to set these shortcuts manually as these actions are not available at all. This breaks user expectation of consistency.

Long time ago, even applications like Dolphin didn't have this behaviour and there were bug reports about this, but these were added at some point later: https://bugs.kde.org/show_bug.cgi?id=336926

Please add these missing actions and set them to the widely used standard by default.
Comment 1 ajay 2025-12-24 18:15:23 UTC
Hello, I would like to work on this issue. Since this is marked as a junior job, I think it would be a good starting point for me to contribute. Is this task still available to be picked up? Any specific guidance ?
Comment 2 Justin Zobel 2025-12-27 00:09:23 UTC
It is not assigned to anyone, so you may start work on it.
Comment 3 Bug Janitor Service 2025-12-27 19:18:57 UTC
A possibly relevant merge request was started @ https://invent.kde.org/graphics/okular/-/merge_requests/1294
Comment 4 Albert Astals Cid 2026-01-29 16:10:27 UTC
Git commit 9793591ab568e199400aa8cbeb77bdc038818eba by Albert Astals Cid, on behalf of Ajay Sharma.
Committed on 29/01/2026 at 16:10.
Pushed by aacid into branch 'master'.

Make Shift+Alt+Number shortcuts to switch tabs

Currently, Okular tabs cannot be switched using keyboard shortcuts, which breaks consistency with web browsers and other KDE apps.

This commit:

1. Adds Shift+Alt+1 through Shift+Alt+9 shortcuts to the Shell to switch tabs. 
2. Implements "Browser Style" logic: 1..8 switch to specific tabs, and 9 always jumps to the last tab. 
3. Uses Shift+Alt modifier to avoid conflicts with the existing Annotation Tools (Alt+Number).

M  +18   -0    shell/shell.cpp

https://invent.kde.org/graphics/okular/-/commit/9793591ab568e199400aa8cbeb77bdc038818eba
Comment 5 D. Debnath 2026-01-29 17:14:39 UTC
(In reply to Albert Astals Cid from comment #4)
> Git commit 9793591ab568e199400aa8cbeb77bdc038818eba by Albert Astals Cid, on behalf of Ajay Sharma.

Thanks for implementing this feature 👍

> 3. Uses Shift+Alt modifier to avoid conflicts with the existing Annotation Tools (Alt+Number).

This makes the shortcuts inconsistent with other programs, and will cause mental overload since it conflicts with muscle memory built through usage of the Alt+Number shortcut in other programs. I suggest changing the Annotation Tools shortcuts to Alt+Shift+Number as this is a Okular specific feature and muscle memory can be retrained specifically for Okular by those who have become accustomed to these shortcuts.
Comment 6 Albert Astals Cid 2026-01-29 17:32:53 UTC
Do not play with the bug status
Comment 7 Christoph Cullmann 2026-02-08 16:24:03 UTC
*** Bug 502516 has been marked as a duplicate of this bug. ***