Added caps lock support

Needs a key to be entered before a change in state can be registered, but I think this is perhaps unavoidable. Merge if you like.