Is there a keyboard shortcut to toggle Tree view / Places View?

Method specific to Compiz / Ubuntu-3D:

If you are using Ubuntu-3D, then you can use bind keyboard keys to terminal commands using CompizConfig Settings Manager.

  1. Warning: CCSM is in universe and not shipped by default for a reason, it can be flaky, so be careful in there, it can break things, if you find yourself with a broken window manager, see this question to reset your configuration.
  2. Install the CompizConfig Settings Manager (CCSM) by clicking on the link.

Click on "Commands".

enter image description here

The terminal commands to switch between "tree" and "places" are as follows:

gsettings set org.gnome.nautilus.window-state side-pane-view "tree"
gsettings set org.gnome.nautilus.window-state side-pane-view "places"

Copy them to appropriate columns and assign keys to these commands to your wish. Here, I have chosen Ctrl + 5 and Ctrl + 6. Once you have done it properly, you can input your chosen keyboard shortcuts and see Nautilus change its view at your fingertips.

Commands

Keybindings

Alternate method (Not limiting to Compiz / Unity - 3D):

Search for "Keyboard" settings. Open "Shortcuts" tab. Move to "Custom Shortcuts" and click the + button. Give the shortcut appropriate name and assign keyboard shortcuts as you wish.

You should use the following commands for switching between "tree" and "places":

gsettings set org.gnome.nautilus.window-state side-pane-view "tree"
gsettings set org.gnome.nautilus.window-state side-pane-view "places"

enter image description here


This Nautilus extension allows you to edit keyboard shortcuts (accelerators).

After installing the extensions go to Edit -> Keyboard Shortcuts... in the main menu and search for actions starting from Sidebar in the Keyboard Shortcuts dialog. Click the Key cell corresponding to the action you need such as Sidebar Tree and enter a shortcut:

enter image description here

The keyboard shortcuts that you enter will even show up in the main menu:

enter image description here


If you are referring to the "list view" in Nautilus, that is easily accessed by pressing ctrl+2.

As for the sidebar, there is no shortcut for changing this setting.