<p>I'm trying to build a better username/password field for my workplace and would like to be able to complain when they have their caps lock on.</p>

<p>Is this possible?  And if so I'd like to have it detected before the client types their first letter.</p>

<p>Is there a non-platform specific way to do this?</p>

Try this, from java.awt.Toolkit, returns a boolean:
```
```
Toolkit.getDefaultToolkit().getLockingKeyState(KeyEvent.VK_CAPS_LOCK)
```
```