public class Events_TD extends TD {

	public static void main(String args[]) {
      Rect r = new Rect();
      Point p = new Point();
      char c;

      InitQuickDraw();
      ShowDrawing();
      c = ' ';
      do {
        if( KeyPressed() )
          writeln("key " + (c = GetKey()));
        if( Button() )
         {
         writeln("modifiers "+((shift & ButtonState())!=0) +" "+ ((control & ButtonState())!=0) +" "+ ((meta & ButtonState())!=0));
         WaitClickUp();
         }
      } while( c != 'q' );
   	}

}

