Would be really nice to find a complete, readable documentation where is explained how the keyboard mechanism works in Ubuntu and how to locally override it (and how it interacts with layout switching).
I am under the suspicion that there is really few people really understanding it (I remember a famous quote of Stephen Hawkings, methinks, about time); I have collected a bit of links in another answer but still, no general how-to.
Basically you should chase all the definitions for your keyboard starting from
/usr/share/X11/xkb/symbols/us --- if your keyboard is
us, substitute as needed; there are a lot of options and includes in it, it seems that most of the modifiers keys are in
/usr/share/X11/xkb/rules/base, where you can find:
caps:none = +capslock(none)
caps:ctrl_modifier = +capslock(ctrl_modifier)
ctrl:nocaps = +ctrl(nocaps)
ctrl:lctrl_meta = +ctrl(lctrl_meta)
ctrl:swapcaps = +ctrl(swapcaps)
ctrl:nocaps Caps Lock as Ctrl
caps:capslock Caps Lock toggles normal capitalization of alphabetic characters
among gazillion other things. So what that mean, and what other options you have, are probably dependent on your layout, but you can try to guess something looking there.
For example I would try
setxkbmap -option caps:capslock
to revert it.
Now, what they exactly mean, how do you enable it (via
control center ->
gnome-tweak-tool, command line, init scripts), how to make them impervious to a layout switch, if they work or not (I am unable to disable caps-lock and make it so across layout switches), is another matter.
If anyone can fill in the answer, please do that. I was used to tweak my keyboard with
xmodmap, I understand this is superceded, but would it be really nice to have an howto to how to tweak your keyboard...