How can I change the keybindings in Nautilus?

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! ¯\_(ツ)_/¯


This shows up high when googling, but doesn't mention one of the solutions working in 2020, so here you go...

The accels are modifiable through the python-nautilus (nautilus-python in non-Debian-based distros) interface. We install the package and create a plugin:

sudo apt install python-nautilus
mkdir -p ~/.local/share/nautilus-python/extensions
nano ~/.local/share/nautilus-python/extensions/CtrlTab.py

Then insert the following code:

#!/usr/bin/env python
# -*- coding: utf-8 -*-

import gi
gi.require_version('Nautilus', '3.0')
from gi.repository import GObject, Nautilus, Gtk

class CtrlTab(GObject.GObject, Nautilus.LocationWidgetProvider):
    def get_widget(self, uri, window):
        app = Gtk.Application.get_default()
        app.set_accels_for_action("win.tab-previous", ["<shift><control>Tab", "<control>Page_Up"])
        app.set_accels_for_action("win.tab-next", ["<control>Tab", "<control>Page_Down"])

Save, exit and make sure nautilus gets shut down with:

nautilus -q

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.