How do I disable Ctrl-Alt-D in gnome-shell?

I am using gnome 3 and gnome-shell (not gnome classic) on Ubuntu 12.04 LTS with emacs. I would like to use the keyboard shortcut Ctrl+Alt+D with emacs, however whenever I hit that keystroke, gnome intercepts it and hides all windows.

I have tried to disable it under Settings > Keyboard > Shortcuts > Navigation > Hide all normal windows. It appears disabled there, but if I hit Ctrl+Alt+D all windows will still minimize.

My next step was to try and use dconf-editor to disable it under org.gnome.desktop.wm.keybindings, but I couldn't find any option for "hide all windows" (or anything similar) there.

Any help would be appreciated, thanks.


Solution 1:

I figured out that the following worked in my case. First, instead of trying to disable the shortcut, give it a new key combination. I did this in System Settings -> Keyboard Layout -> Layouts -> Options..., but it's a known bug that these settings are not respected in Gnome Shell.

Additionally, use dconf-editor to give it the same key combination:

  1. Open dconf-editor (Alt-F2, enter dconf-editor)
  2. Expand until the element: org → gnome → desktop → wm → keybindings.
  3. Change the value for the correct key (in your case, this should be show-desktop).

In my case, I wanted C-M-s be respected in Emacs, and not roll up the current window. So instead of trying to disable the shortcut by using brackets in dconf-editor, I gave toggle-shaded a new key combination: ['<Control><Super>s']. And suddenly, C-M-s was available in Emacs. Hope this helps for you, too.

Solution 2:

To disable the keybinding with gsettings, just use the value ['disabled']:

gsettings set org.gnome.desktop.wm.keybindings toggle-shaded "['disabled']"

Solution 3:

I just hit this problem on Ubuntu 12.04 LTS trying to unset the Ctrl+Alt+S binding for "toggle-shaded". AFAIK, I'm running the out-of-the-box window config: GNOME3, Compiz, Metacity, Unity.

Both Compiz and Metacity bind Ctrl+Alt+S, which REALLY threw me because I kept trying to edit the keybinding for compiz as a number of posts indicate (or rather org.gnome.desktop.wm.keybindings). But this changed nothing that I could see, even after restarting X.

In frustration I tried to edit the Metacity keybindings, which succeeded immediately (no need to restart unity, compiz or X.) Here's the command line:

gconftool-2 --unset /apps/metacity/window_keybindings/toggle_shaded

Check $HOME/.gconf/apps/metacity/window_keybindings/%gconf.xml for the changes.

I monitored changes to all files in my $HOME via man:find while trying the various config editors: gnome-control-center, ccsm, dconf-editor, gconftool-2 to see what changed.

dconf-editor worked well for compiz. My understanding is compiz and metacity work together to render the display but I don't know how. And I think there are a number of pluggable window managers that work with compiz, so that may further complicate the issue.

Solution 4:

Also don't forget to check if you've activated the Screenshot Window Sizer extension in GNOME Tweak Tool. It maps the Ctrl+Alt+S to resize gnome windows in various 16:9 formats.