Ok...Interesting. I have new iMac, new wireless keyboard and every night computer goes to sleep, sometimes during day, but next day, I wake it up and Caps Lock light is only thing not working on my keyboard. I like it to work so I know when I enter passwords I didn't hit it by mistake.
I got Apple to give me a new keyboard entirely. Brand new. I did all the re-pairing things. The new keyboard does the same thing. They told me to bring iMac in with keyboard and they will run a sys-check.
Also, in all my Spotlight searches, there was a suggestion to hold that key down longer. Maybe it will come on again. I will also put my Apple to sleep after 20 minutes, not ten, and see if that helps. This is a real Apple glitch if this is 2012 and people are still having problems.
Will try tomorrow to see if holding down key longer helps. Also, my screensaver isn't running, so I set up hotspots to run it. Let's see if that keeps the display more active and hence the caps lock key, although it shouldn't make a difference.