How to allow for caps-lock keyboard layout change

You could set the corresponding xkb option via dconf-editor.
Navigate to org > gnome > desktop > input-sources and add grp:caps_toggle to your xkb-options:

enter image description here

Note each option is enclosed in single quotes, options are separated by comma+space.


On older gnome3 releases you could do that also via System Settings > Keyboard (or gnome-control-center keyboard in terminal) > Typing > Modifiers-only switch to next source to Caps Lock

enter image description here

This was removed from recent releases (see sanmai's answer for alternatives to dconf-editor).


If you're looking for a way to visually edit configuration as in other answer, there's dconf-editor supplied with dconf-tools:

sudo aptitude install dconf-tools

If you fancy batch editing needed value, here's how you can read it:

dconf read /org/gnome/desktop/input-sources/xkb-options

And here's how to update it:

dconf write /org/gnome/desktop/input-sources/xkb-options "['grp:caps_toggle']"

You may need to logout and log back in for changes to take effect, but in my case changes came into effect immediately.

Other option is to use gnome-tweaks.

Location of the "Additional Layout Options" button in the interface of Gnome Tweaks.

Menu showing an option to use CAPS LOCK as a keyboard switch.