3

I'd like to change the keybindings in Nautilus. Specifically, I'd like to make it so Ctrl + Tab and Ctrl + Shift + Tab cycles between tabs instead of Ctrl+ PgUp / PgDn. I can't seem to find anything in dconf, and Nautilus only lists the shortcuts and doesn't let me change them. I tried using the solution here, but (1) the file ~/.config/nautilus/accels does not exist, so I can't figure out the syntax/lines I'm supposed to edit, and (2) making the file and copying their code into it didn't do anything. Any help is appreciated! Thanks!

  • Whatever is shown in dconf-editor > org/gnome/desktop/wm/keybindings can be edited. An accels map is no longer used so it would be useless.. – doug Jun 1 '18 at 22:42
  • I looked in org/gnome/desktop/wm/keybindings, and it only seems to contain keyboard shortcuts for moving windows, not for Nautilus, specifically. Is there anywhere else in dconf that I might find keybindings for Nautilus? – Jonathan Jun 3 '18 at 3:07
  • Take a look here, seems to the only way for custom accels, askubuntu.com/questions/680016/… – doug Jun 3 '18 at 18:45
4
+50

You can, but it's not easy: The standard parameters of Nautilus do not allow you to change these keybindings as there are no configuration parameters for them:

gsettings list-recursively | grep --ignore-case nautilus

So you have 2 possibilities:

  1. Switch to Nemo, which has the capabilities you seek out of the box (and more ...)
  2. Clone the source of Nautilus, edit the source code, change Ctrl+PgUp to Ctrl+Tab and build your own version:

    cd Documents
    git clone https://github.com/GNOME/nautilus
    cd nautilus/src
    grep --recursive --ignore-case tabs *
    nano nautilus-window.c #This is where you need to do more work yourself
    cd ..
    ./configure
    make
    sudo checkinstall
    

That's as far as I want to go, because I took the easy way and deployed Nemo because I abhor the direction the GNOME developers took as they prefer "simplicity", whereas I like my stuff complex and full of features.

Sorry! ¯\_(ツ)_/¯

  • Thanks @Fabby. :) What does the grep --recursive --ignore-case tabs * line do? just because of the word tabs, it makes me think that it might be related to the original particulars. personally, i don't care about that particular shortcut, and accordingly wanna see if that's needed for any other use case, or if should be a different command for different keybindings. And thanks for the Nemo suggestion - sounds like the better way to go. :) – thisissami Jun 4 '18 at 19:38
  • 1
    It shows you all the source code files containing the word tabs. 0:-) I think it's nautilus-window.c you need, but YMMV. Go Nemo, like I did: nemo has a lot of bells and whistles and is far superior to Nautilus, though very similar in its basic usage. @thisissami You'll feel right at home. – Fabby Jun 4 '18 at 19:40
1

Old Bug

This is an old bug appearing in many bug reports. This bug report is from 2009.

FireFox and Windows both support Control+Tab for switching tabs. On many laptops Page Up might be hard to reach or poorly labeled. Even on most desktop keyboards Control+Page Up is impossible to perform with the left hand.

For one-handed shortcuts you can use Alt+1 for the first tab, Alt+2 for the second tab, etc.

Gnome's design is for Control+Tab is used for switching panes within windows. For example from the main pane to the left side pane.


Suggested gsettings hack that doesn't seem to work

A "hack" in this bug report illustrates these two gsettings you can view before changing:

$ gsettings get org.gnome.Terminal.Legacy.Keybindings:/org/gnome/terminal/legacy/keybindings/ next-tab
'<Control>Page_Down'
$ gsettings get org.gnome.Terminal.Legacy.Keybindings:/org/gnome/terminal/legacy/keybindings/ prev-tab
'<Control>Page_Up'

Then to change them use:

$ gsettings set org.gnome.Terminal.Legacy.Keybindings:/org/gnome/terminal/legacy/keybindings/next-tab '<Primary>Tab'
$ gsettings set org.gnome.Terminal.Legacy.Keybindings:/org/gnome/terminal/legacy/keybindings/prev-tab '<Primary><Shift>Tab'

This successfully changes behavior switching between gnome-terminal tabs but has no effect in Nautilus or even YAD.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.