Program TestMouse ;

{$I mouse.inc }

Var x,y :Integer;
    t1,t2:Byte;
Begin
   ClrScr;
   Writeln('Searching Mouse  ....');
   If Not MouseDetected then
     Begin
       Writeln('Mouse NOT found !');
       Halt;
     End;
   Writeln('Mouse found at joystick port : ',MousePort);
   Writeln('Writing values after 3 seconds delay.  BUTTON 2 = EXIT.');
   Delay(3000);
   Repeat
        GetMouse(MousePort,x,y,t1,t2);
        Writeln(x,' ',y,' ',t1,' ',t2);
  Until t2 <> 0;
End.
