Mega Code Archive

 
Categories / Delphi / Hardware
 

How to find out if CAPS LOCK is on

Title: How to find out if CAPS LOCK is on? Question: If you need to kwnow the state of the CAPS LOCK key use this function Answer: function IsCapsLockOn : Boolean; begin Result := 0 (GetKeyState(VK_CAPITAL) and $01); end;