hola he leido tu pregunta... he aqui te paso algunos procedimiento, puede que te siervan como ami....
-------------------------------------------------------------------
Código Delphi
[-]
procedure TForm.FormKeyDown(Sender: TObject; var Key: Word;
Shift: TShiftState);
begin
if Key = VK_NUMLOCK then
case (GetKeyState(VK_NUMLOCK) + 127) of
0: ShowMessage('Activo'); -1: ShowMessage('Inactivo'); end;
end;
if GetKeyState(VK_CAPITAL) = 1 then
bEstado.Panels[8].Text := rsBloqMayus
else
bEstado.Panels[8].Text := '';
if GetKeyState(VK_NUMLOCK) = 1 then
bEstado.Panels[9].Text := rsBloqNum
else
bEstado.Panels[9].Text := '';
if GetKeyState(VK_SCROLL) = 1 then
bEstado.Panels[10].Text := rsScrolLock
else
bEstado.Panels[10].Text := '';
procedure TMain.KeyState();
begin
If GetKeyState(VK_NUMLOCK) = 1 Then
StatusBar.Panels[2].Style:= psText
else
StatusBar.Panels[2].Style:= psOwnerDraw;
If GetKeyState(VK_CAPITAL) = 1 Then
StatusBar.Panels[3].Style:= psText
else
StatusBar.Panels[3].Style:= psOwnerDraw;
If GetKeyState(VK_SCROLL) = 1 Then
StatusBar.Panels[4].Style:= psText
else
StatusBar.Panels[4].Style:= psOwnerDraw;
end;
procedure TMain.KeyPressed(Key: DWORD);
begin
If Key = VK_NUMLOCK then
if (GetKeyState(VK_NUMLOCK) + 127) = 0 Then
StatusBar.Panels[2].Style:= psText
else
StatusBar.Panels[2].Style:= psOwnerDraw;
If Key = VK_CAPITAL then
if (GetKeyState(VK_CAPITAL) + 127) = 0 Then
StatusBar.Panels[3].Style:= psText
else
StatusBar.Panels[3].Style:= psOwnerDraw;
If Key = VK_SCROLL then
if (GetKeyState(VK_SCROLL) + 127) = 0 Then
StatusBar.Panels[4].Style:= psText
else
StatusBar.Panels[4].Style:= psOwnerDraw;
end;