I have notice that since a few days my cap lock stays on if I press on caps lock. I can't desactivate it. I am currently using Ubuntu 12.04LTS on my old Emachines computer. So I would like to know where is the command to get back the default settings when I press the caps lock.
For newer versions: Click on the Ubuntu button and search for "Keyboard Layout" and select "Options..."
For 11.10 and older: From System Settings... open the "Keyboard Layout" and select "Options...".
Look for the Caps Lock key behaviour entry and unfold the list of options to give you this: