Is it possible to determine when capslock is set?

Want to put up a warning on login dialogs

/MM