The Keyboard Viewer is designed to reflect the hardware keyboard that you are using, same keyboard layout, same language, etc.
Full typing from the viewer is not really its purpose.
What keyboard are you using?
Ah, OK, I tried disconnecting my hard keyboard while the Keyboard Viewer is in view.
Guess what? No Caps lock
And, there does not appear to be a method to use the keyboard viewer to type in caps. You can show caps, but you can't actually type in caps.
Looks like normal operation when you are not using a hardware keyboard.
So, the OS X Keyboard Viewer is NOT a replacement for a hardware keyboard - it is not an input source, really just an input verifier, or reporter.
I don't think you will see an on-screen typing keyboard until Apple supports touch-screen in OS X - and that's a "not yet" on that.
You need to use a real keyboard.