
function CapsLockState: Bool;
var
KS: TKeyboardState;
begin
GetKeyboardState(KS);
if bool(ks[020])
then Result := True else
Result := False;
end;
function ShiftState: BOOL;
var
KS: TKeyboardState;
begin
GetKeyboardState(KS);
if bool(ks[016])
then Result := True else Result
:= False;
end;
function NumLockState: BOOL;
var
KS: TKeyboardState;
begin
GetKeyboardState(KS);
if bool(ks[144])
then Result := True
else Result := False;
end;
function ContrlState: BOOL;
var
KS: TKeyboardState;
begin
GetKeyboardState(KS);
if bool(ks[017])
then Result := True
else Result := False;
end;