I'm learning the MOUSE unit for console programming, the following code is from the RTL document. When i ran it and click mosue button,there was no reaction. My environemnt: Window 10, fpc 3.2.2
uses mouse;
var
event:TMouseEvent;
visible:boolean;
begin
InitMouse;
ShowMouse;
Visible:=True;
writeln('Press left mouse button to hide/show, right button quits');
repeat
getMouseEvent(event);
with event do
if (buttons=MouseLeftButton) and (Action=MouseActionDown) then
begin
if Visible then
HideMouse
else
ShowMouse;
end;
until (event.Buttons=MouseRightButton) and (event.Action=MouseActionDown);
DoneMouse;
end.