Verificação das teclas Caps, Scroll e NUM

Veja nesse artigo como fazer a verificação das teclas Caps, Scroll e NUM através de função string no Delphi

Veja abaixo a função para verificar a s teclas caps, scroll e NUM em Delphi.

function KeyLeads:String; Var State : String; KeyState : TKeyboardState; begin State := ''; GetKeyboardState(KeyState); if (KeyState[VK_NUMLOCK] = 1) then begin State := State + 'Num Lock'; end; if (KeyState[VK_CAPITAL] = 1) then begin State := State + 'Caps Lock'; end; if (KeyState[VK_SCROLL] = 1) then begin State := State + 'Scroll Lock'; end; Result := State; end;

Artigos relacionados