'**SUMMARY**
CheckEvents checks the pygame event queue and sets the internal display
values based on any new generated events.
.. warning::
This method must be called (or :py:meth:`isDone` or :py:meth:`isNotDone`) to
perform mouse event checking.
**PARAMETERS**
returnStrings - pygame returns an enumerated int by default, when this is set to true we return a list of strings.
**RETURNS**
A list of key down events. Parse them with pg.K_<lowercase_letter>'

def checkEvents(self, returnStrings=False):

    self.mouseWheelUp = self.mouseWheelDown = 0
    self.lastLeftButton = self.mouseLeft
    self.lastRightButton = self.mouseRight
    self.leftButtonDown = None
    self.leftButtonUp = None
    self.rightButtonDown = None
    self.rightButtonUp = None
    key = []
    for event in pg.event.get():
        if (event.type == pg.QUIT):
            pg.quit()
            self.done = True
        if (event.type == pg.MOUSEMOTION):
            self.mouseRawX = event.pos[0]
            self.mouseRawY = event.pos[1]
            x = int(((event.pos[0] - self.xoffset) * self.xscale))
            y = int(((event.pos[1] - self.yoffset) * self.yscale))
            (self.mouseX, self.mouseY) = self._clamp(x, y)
            (self.mouseLeft, self.mouseMiddle, self.mouseRight) = event.buttons
        if (event.type == pg.MOUSEBUTTONUP):
            self._setButtonState(0, event.button)
        if (event.type == pg.MOUSEBUTTONDOWN):
            self._setButtonState(1, event.button)
        if (event.type == pg.KEYDOWN):
            if returnStrings:
                key.append(pg.key.name(event.key))
            else:
                key.append(event.key)
    self.pressed = pg.key.get_pressed()
    if ((self.lastLeftButton == 0) and (self.mouseLeft == 1)):
        self.leftButtonDown = (self.mouseX, self.mouseY)
    if ((self.lastLeftButton == 1) and (self.mouseLeft == 0)):
        self.leftButtonUp = (self.mouseX, self.mouseY)
    if ((self.lastRightButton == 0) and (self.mouseRight == 1)):
        self.rightButtonDown = (self.mouseX, self.mouseY)
    if ((self.lastRightButton == 1) and (self.mouseRight == 0)):
        self.rightButtonUp = (self.mouseX, self.mouseY)
    if (self.pressed[pg.K_ESCAPE] == 1):
        self.done = True
    return key
