The class provides simple access to joysticks (game controllers) through using Win32 API, which allows to enumerate available devices and query their status (state of all buttons, axes, etc).
Sample usage:
// enumerate available devices List<Joystick.DeviceInfo> devices = Joystick.GetAvailableDevices( ); foreach ( Joystick.DeviceInfo di in devices ) { System.Diagnostics.Debug.WriteLine( string.Format( "{0} : {1} ({2} axes, {3} buttons)", di.ID, di.Name, di.Axes, di.Buttons ) ); } // create new joystick and initialize it Joystick joystick = new Joystick( 0 ); // get its current status Joystick.Status status = joystick.GetCurrentStatus( ); // check if 1st button is pressed if ( status.IsButtonPressed( Joystick.Buttons.Button1 ) ) { // 1st button is pressed }