capslockstate is a JQuery plugin which monitors the state of the Caps Lock key.  It will trigger events when the state changes and has a method to return the current state.