code: def query_state(self, StateType):
          
          if StateType == M_LEFT:
              # Checking left mouse button
              return self.left_pressed
          elif StateType == M_MIDDLE:
              # Checking middle mouse button
              return self.middle_pressed
          elif StateType == M_RIGHT:
              # Checking right mouse button
              return self.right_pressed
docs: Is a button depressed?
          True if a button is pressed, false otherwise.