![[Contents]](../images/toc_d.gif) 
 ![[Index]](../images/index.gif) 
 ![[Help]](../images/help_d.gif) 
 ![[Retrace]](../images/retrace_d.gif) 
 ![[Browse <]](../images/prev.gif) 
 ![[Browse >]](../images/next.gif) 
You read gameport events by passing an I/O request to the device with
gpd_readevent set in io_command, the address of the inputevent structure
to store events set in io_Data and the size of the structure set in
io_Length.
   struct InputEvent  GameEV;
   struct IOStdRequest *GameIO;  /* Must be initialized prior to using */
   void send_read_request()
   {
   GameIO->io_Command = GPD_READEVENT;  /* Read events */
   GameIO->io_Length = sizeof (struct InputEvent);
   GameIO->io_Data = (APTR)&GameEV;     /* put events in GameEV*/
   SendIO(GameIO);                      /* Asynchronous */
   }