Vamos a mejorarlo, que con los númeritos se hace más difícil.
Usaremos las virtual key que para eso estan
Código Delphi
[-]
if (getkeystate(VK_NUMLOCK) =1) or (getkeystate(VK_NUMLOCK) =-127) then Edit1.Text := 'Bloq.Num'
else Edit1.Text := '';
if (getkeystate(VK_CAPITAL) =1) or (getkeystate(VK_CAPITAL) =-127) then Edit2.Text := 'Mayús'
else Edit2.Text := 'Minus';
if (getkeystate(VK_INSERT) =1) or (getkeystate(VK_INSERT) =-127) then Edit3.Text := 'Sob.'
else Edit3.Text := 'Ins.';