I wish I knew more about this to be honest but I did a google search on the caps lock idea in java and got this piece of code:
java.awt.Toolkit.getDefaultToolkit().getLockingKeyState(java.awt.event.KeyEvent.VK_CAPS_LOCK);
There are more on which events you can get here:
KeyEvents (http://java.sun.com/j2se/1.5.0/docs/api/java/awt/event/KeyEvent.html)
and the ToolKit API:
ToolKit (http://java.sun.com/j2se/1.5.0/docs/api/java/awt/Toolkit.html)
Anyways, depending on what you're searching for as far as other system commands go depends on how it can be used.