function IsCapsLockOn : Boolean; begin Result := 0 <> (GetKeyState(VK_CAPITAL) and $01); end;
Взято из http://forum.sources.ru