window-switching keyboard shortcuts interfere with emacs and cannot be changed in the main keyboard system preferences

Update: much simpler answer courtesy of another thread:

gsettings set org.gnome.desktop.wm.keybindings switch-group "['disabled']"

original answer:

the obvious workaround involves CompizConfig Settings Manager, which can be installed easily as explained in many, many places. However, the steps necessary to remap some keys like Alt-` are completely non-obvious, due to a possible bug in Compiz.

First, in CCSM, go to Ubuntu Unity Plugin. Then go to the last tab, which is labelled Switcher, and examine the Key to flip through windows in the Switcher (without "backwards") item. It is already disabled, but this is actually what is performed by Alt-`. To really disable it, enable this feature (with some garbage random key combination).

Note that if you disable it again, then it really is disabled, but after a reboot the bug will return. Hence, to really get rid of Alt-`, you need to assign it some random garbage key combination, like Shift-Alt-Ctrl-Pause/Break or something.

There are also some other key shortcuts in Compiz, like ones involving Super (Mac/Windows icon key on keyboard) that has this bug in Compiz, e.g. it says disabled but is actually enabled.

Also, in CCSM, there is an Application Switcher category, as well as a "static" version of it. Those should be disabled if Ubuntu Unity Plugin category is enabled, since there are a few conflicting shortcut keys. However, most of the shortcut keys not found in the original Ubuntu System settings -> Keyboard page can be found and modified here.


In Ubuntu 19.10 there is even more interference.

So far I had to remap the following key-bindings to not interfere with emacs.

You can use dconf-editor to view all the org.gnome.desktop.wm.keybindings and even edit them.

Here is the list I remapped and what I the remapping is I did using gsettings:

Alt+`

gsettings set org.gnome.desktop.wm.keybindings switch-group "['<Super>Above_Tab']"

Ctrl+Alt+

gsettings set org.gnome.desktop.wm.keybindings switch-to-workspace-down "['<Super>Page_Down']"

Ctrl+Alt+

gsettings set org.gnome.desktop.wm.keybindings switch-to-workspace-left "['[]']"

Ctrl+Alt+

gsettings set org.gnome.desktop.wm.keybindings switch-to-workspace-right "['[]']"

Ctrl+Alt+

gsettings set org.gnome.desktop.wm.keybindings switch-to-workspace-up "['<Super>Page_Up']"