procedure LimpaBuffer;
var
ke: TKeyboardState;
i : Integer;
begin
GetKeyboardState(ke);
for i:= 0 to 255 do ke[i]:=0;
SetKeyboardState(ke);
end;