! Please note that this is a snapshot of our old Bugzilla server, which is read only since May 29, 2020. Please go to gitlab.xfce.org for our new server !
Keyboard shortcuts for tab navigation
Status:
RESOLVED: FIXED
Severity:
enhancement

Comments

Description Evangelos Foutras 2012-12-04 19:49:27 CET
It'd be nice to allow tab navigation in Thunar using the keyboard.

Go to next tab: Ctrl+PageDown
Go to previous tab: Ctrl+PageUp
Go to tab-n: Alt+n (n = {0..9})

The above shortcuts are consistent with Nautilus and Terminal, with the exception of Alt+0; Nautilus will switch to the 10th tab while Terminal won't accept it as a keyboard shortcut. Thunar could also switch to the 10th tab on Alt+0.
Comment 1 Nick Schermer editbugs 2012-12-07 20:24:17 CET
Ctrl+PageUp/Down are already taken by the icon view for cursor navigation.

Added alt nav in commit a065d091.
Comment 2 Dumitru Moldovan editbugs 2013-01-10 12:41:17 CET
Thank you, I confirm the  Alt+n shortcuts work, but I would argue for Ctrl+PageUp/PageDown shortcuts and more... If there is need to open a new bug report, I will do that. I just want to avoid getting the new bug report marked for duplication.

I think the Ctrl+PageUp/PageDown keyboard shortcuts would make more sense for switching between tabs as all other GTK+ apps with tabs that I know use this keyboard combos for switching between tabs: Galeon, GNOME Terminal, Epiphany, Nautilus, Chromium etc. 

If these combos are already taken by the icon view for cursor navigation, please allocate new shortcuts for that. I use the icon view all the time and had no idea of this feature. I think it would be better to have the small number of people that use this little known feature to accommodate to Alt+PageUp/PageDown for cursor navigation in the icon view, because breaking the habit of all tab users in GTK+ apps is worse. I find myself pressing Ctrl+PageUp/PageDown and then asking myself why it doesn't work in Thunar.

Another frequently used keyboard combo in this context is Ctrl+Shift+PageUp/PageDown, used to move the current tab to the left and to the right between tabs. This combo also works in all of the aforementioned GTK+ apps.

Thanks!
Comment 3 Claveau 2013-10-28 12:17:41 CET
(In reply to Mișu Moldovan from comment #2)
> Thank you, I confirm the  Alt+n shortcuts work, but I would argue for
> Ctrl+PageUp/PageDown shortcuts and more... If there is need to open a new
> bug report, I will do that. I just want to avoid getting the new bug report
> marked for duplication.
> 
> I think the Ctrl+PageUp/PageDown keyboard shortcuts would make more sense
> for switching between tabs as all other GTK+ apps with tabs that I know use
> this keyboard combos for switching between tabs: Galeon, GNOME Terminal,
> Epiphany, Nautilus, Chromium etc. 
> 
> If these combos are already taken by the icon view for cursor navigation,
> please allocate new shortcuts for that. I use the icon view all the time and
> had no idea of this feature. I think it would be better to have the small
> number of people that use this little known feature to accommodate to
> Alt+PageUp/PageDown for cursor navigation in the icon view, because breaking
> the habit of all tab users in GTK+ apps is worse. I find myself pressing
> Ctrl+PageUp/PageDown and then asking myself why it doesn't work in Thunar.
> 
> Another frequently used keyboard combo in this context is
> Ctrl+Shift+PageUp/PageDown, used to move the current tab to the left and to
> the right between tabs. This combo also works in all of the aforementioned
> GTK+ apps.
> 
> Thanks!


I think you are wrong here : ctrl+tab or ctrl+shift+tab working like ctrl+PageUp/ctrl+PageDown is just a useless duplicate of controls.

A really useful behavior is the one adopted by geany : ctrl+tab works with a history of opened tabs and allows the user to go from the last opened one to the tab opened before and so on. Exactly like super+tab with apps.

This behavior is available with the extension ctrl+tab and maybe for chromium (even if I don't care).

Anyway thanks a lot for the tab feature, Thunar is definitely the best file manager I've ever used on linux. Having history based tab controls would make it even better!
Comment 4 Dumitru Moldovan editbugs 2013-10-29 21:44:05 CET
(In reply to Claveau from comment #3)
> 
> I think you are wrong here : ctrl+tab or ctrl+shift+tab working like
> ctrl+PageUp/ctrl+PageDown is just a useless duplicate of controls.

Sorry Claveau, I don't think anyone mentioned ctrl-tab and ctrl-shift-tab here.
Comment 5 Claveau 2013-10-30 17:11:17 CET
(In reply to Mișu Moldovan from comment #4)
> (In reply to Claveau from comment #3)
> > 
> > I think you are wrong here : ctrl+tab or ctrl+shift+tab working like
> > ctrl+PageUp/ctrl+PageDown is just a useless duplicate of controls.
> 
> Sorry Claveau, I don't think anyone mentioned ctrl-tab and ctrl-shift-tab
> here.

Damn! I'm really sorry for the confusion : I thought my Thunar version was just a few old and ctrl+PageUp/PageDown was just not enabled but already implemented in the last version. I read too fast.

Btw, the history based tab switching through ctrl+tab would be a really nice feature.

Sorry again :)
Comment 6 Drew DeVault 2014-02-05 22:43:54 CET
Expressing support for ctrl+pageup/pagedown for tab navigation, or at least some other shortcut that I can rebind it to ctrl+pageup/pagedown. Most tabbed applications use this shortcut for this action, I think it would be worth replacing the conflicting shortcut with it, to prevent confusion from users accustomed to other software. Example: I bound ctrl+pageup/pagedown to two buttons on my mouse that work for everything but thunar.
Comment 7 valdaer 2014-05-18 21:29:37 CEST
+1 for adding ctrl+pageup/pagedown for tab navigation, in most application this keyboard shortcut does that, not only gtk.
Comment 8 Helder 2015-01-07 22:25:36 CET
Bug 10987 seems to be a duplicate of this.
Comment 9 Harald Judt editbugs 2015-04-17 21:27:16 CEST
*** Bug 10987 has been marked as a duplicate of this bug. ***
Comment 10 Thomas W. 2016-08-21 15:52:43 CEST
Anyone willing to contribute to a bounty on Bountysource?

https://www.bountysource.com/issues/3547148-keyboard-shortcuts-for-tab-navigation
Comment 11 weyfonk 2016-09-13 19:32:36 CEST
Created attachment 6837 
Tab navigation with Ctrl+F6/F7

Here is a patch that should work with Ctrl+F6 and Ctrl+F7.
I haven't been able to use Ctrl+PageUp and Ctrl+PageDown successfully since those keybindings are already used for cursor navigation, as said by Nick.

Suggestions welcome, especially regarding the choice of keys or how to work around PageUp and PageDown being already taken.
Comment 12 Andre Miranda editbugs 2017-09-19 02:10:45 CEST
@weyfonk, Ctrl+F6/F7 doesn't make much sense, do you know any app that uses these shortcuts?
In some apps, Ctrl+F6 is supposed to focus the search bar.
The following tabbed apps use Ctrl+[Shift+]Tab and/or Ctrl+PageUp/Page Down:
Firefox, Chromium, Nemo, Geany : Both
Nautilus, Xfce4-Terminal, GIMP, Mousepad: Ctrl+PageUp/Page Down

From my observation, all of them support Ctrl+PageUp/Page Down and some also support Ctrl+Tab. Unfortunately, to support Ctrl+PageUp/Page Down, ExoIconView has to provide on its API a method to disable this keybinding. It would also require the use of macros to check the Exo version that includes this new feature.
I'd try to keep things simple and just support Ctrl+[Shift+]Tab, but if you (weyfonk) or anyone else is willing to hack Exo, I go ahead :)
Comment 13 weyfonk 2017-10-08 11:18:40 CEST
A first attempt suggests that Ctrl+[Shift+]Tab, although convenient for some users, are currently not usable for tab navigation either. 
Indeed, Tab is already used to switch focus between widgets within the Thunar window. Hacking Exo to support Ctrl+Page{Up|Down} may be our only option left. Other ideas welcome as well :)
Comment 14 sc0w 2017-10-13 01:46:38 CEST
Created attachment 7361 
patch

Please test and review, this patch works

Best regards,
Pablo
Comment 15 Jan Havran 2017-10-13 23:57:51 CEST
Working for me, good job!
Comment 16 Laurentius 2018-01-21 19:53:01 CET
Consistency should be priority and  also, unless there is a very good reason, the most used standards should be followed: if possible, apps should ship same shortcut for basic things and find other alternatives for less used actions.

By the way, which are currently (Thunar 1.6.11) the differences between 

PageUp/PageDown 
and 
Ctrl+PageUp/PageDown

(both in Icon and Detailed list view)? 

They are slightly different, but i don't get the point of the second combo. Seems quite useless.

I think that the keyboard navigation is quite good but currently messy at Thunar, and can be improved. There are some duplications inconsistencies, and traps. I think I should try another thread because it is more general that "tab" navigation.

But, for example, Tab is not exactly symmetrical with its reversal: Shift+Tab allows you to get to the Column header widget in the Detailed list view,  but Tab does not, it just skips it.
Comment 17 Otar Magaldadze 2018-06-26 21:20:26 CEST
So, in short, will ctrl+pgup/pgdwn work for tab navigation in future versions of Thunar? or we will have to patch it manually?
Comment 18 sc0w 2018-06-26 23:12:55 CEST
I did a patch that works, see my previous comment.

I am waiting the review of some xfce developer since a long time ago...
Comment 19 Andre Miranda editbugs 2018-06-29 04:35:22 CEST
Created attachment 7813 
Thunar tab patch

(In reply to sc0w from comment #18)
> I did a patch that works, see my previous comment.
> 
> I am waiting the review of some xfce developer since a long time ago...

Hi Pablo, sorry for the long delay to reply, we were busy on the gtk3 port, so your patch went unnoticed.

Your patch looks good, surprisingly it accomplish what we wanted (ctrl+page up/down) without any exo modification, well done!

I was able to simplify the patch and fix the empty menu items on tabs' context menu. Any reason to introduce a signal to switch tabs besides avoiding a couple of duplicate lines?
Comment 20 Git Bot editbugs 2018-09-24 23:56:43 CEST
Pablo Barciela referenced this bugreport in commit 0c12ff0b037db2805bcfc2f988eaac5af44b233a

Allow tabs switch with Ctrl + PgUp/PgDown (Bug #9585)

https://git.xfce.org/xfce/thunar/commit?id=0c12ff0b037db2805bcfc2f988eaac5af44b233a
Comment 21 Git Bot editbugs 2018-09-24 23:57:49 CEST
Pablo Barciela referenced this bugreport in commit 18f61de6071a4e5486326bb7da72f269a63e1794

Allow tabs switch with Ctrl + PgUp/PgDown (Bug #9585)

https://git.xfce.org/xfce/thunar/commit?id=18f61de6071a4e5486326bb7da72f269a63e1794
Comment 22 Andre Miranda editbugs 2018-09-25 00:03:37 CEST
@Pablo I have pushed your modified patch to master and xfce-4.14 branches, soon to be release as 1.8.2.
As you can see, I kept you as the author, so you may reclaim the bounty for this bug at bountysource (no idea how it works).

Once again thanks for you contribution.

Bug #9585

Reported by:
Evangelos Foutras
Reported on: 2012-12-04
Last modified on: 2018-09-25
Duplicates (1):
  • 10987 Support for browsing tabs using ctrl + page up/ down keys

People

Assignee:
Jannis Pohlmann
CC List:
13 users

Version

Attachments

Tab navigation with Ctrl+F6/F7 (4.50 KB, patch)
2016-09-13 19:32 CEST , weyfonk
no flags
patch (6.88 KB, patch)
2017-10-13 01:46 CEST , sc0w
no flags
Thunar tab patch (3.83 KB, patch)
2018-06-29 04:35 CEST , Andre Miranda
no flags

Additional information