How can get whether Caps Lock is on or off? I tried to search it but all I'm finding is how to toggle or turn it on/off which is exactly opposite of what I'm looking for.
I'm trying to do that in both C++ and Delphi.
Please help
Pressing the key with the magnifying glass while also pressing the Alt key toggles Caps Lock on and off. You'll know that Caps Lock is on when you type some letters and they are all capitals. Press this keyboard combination again to turn Caps Lock back off.
In the remote Windows system, click the Start button, located in Windows Taskbar. Go to Accessories > Ease of Access / or Accessibility sub folder. Open Microsoft On-Screen Keyboard software. Click Caps Lock (key in remote On-Screen Keyboard) to toggle the remote keyboard status (unlock caps).
Simplest method: Type one character, then press 4 on num pad: If a character is typed in the field, then num lock is on. If cursor moves to left then num lock is off.
You want the GetKeyState() function:
http://msdn.microsoft.com/en-us/library/ms646301(VS.85).aspx
with the VK_CAPITAL key code. Rest of the virtual key codes are here:
http://technet.microsoft.com/en-us/subscriptions/index/dd375731(v=vs.85).aspx
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With