Tecnobyte

{ Esta função retorna true se a tecla informada estiver pressionada. False em caso contrário. } function tbKeyIsDown(const Key: integer): boolean; begin Result := GetKeyState(Key) and 128 > 0; end; { Exemplos de uso: } if tbKeyIsDown(VK_CONTROL) then { Tecla Ctrl pressionada } if tbKeyIsDown(VK_MENU) then { Tecla Alt pressionada } if tbKeyIsDown(VK_SHIFT) then { Tecla Shift pressionada } if tbKeyIsDown(VK_F2) then { Tecla F2 pressionada }
O conteúdo desta página pode ajudar alguém? Compartilhe!