Reading the CapsLock key...

Started by
2 comments, last by Illumini 21 years, 4 months ago
I know this must be really simple but the things on MSDN i find about it seem to be about setting it value not reading it lol... I just wanna know if Caps lock is on or off.. Thanks
Advertisement
Use the API function "GetKeyState" on Caps Lock''s ASCII value.

I believe a simple GetKeyState(20) will return its state.

swift URL | browse my bookmarks [server may not always be on]

Sensimed | Info/download
Check for the low order bit of GetKeyState(VK_CAPS_LOCK).
The hi order bit tells you whether the key''s actually held down.
[My Lousy Page | Kings Of Chaos | Vampires | [email=lordlethis@hotmail.com]email.me[/email]]
Thanks all

This topic is closed to new replies.

Advertisement