'Check for pygame events (mainly keyboard/mouse events).
Passes the events onto the GUI also.'

def checkEvents(self):

    for event in pygame.event.get():
        if ((event.type == QUIT) or ((event.type == KEYDOWN) and (event.key == pygame.K_ESCAPE))):
            return False
        elif (event.type == KEYDOWN):
            self._Keyboard_Event(event.key, down=True)
        elif (event.type == KEYUP):
            self._Keyboard_Event(event.key, down=False)
        elif (event.type == MOUSEBUTTONDOWN):
            if (event.button == 4):
                self.viewZoom *= 1.1
            elif (event.button == 5):
                self.viewZoom /= 1.1
        elif (event.type == MOUSEMOTION):
            if self.rMouseDown:
                self.viewCenter -= ((event.rel[0] / 5.0), ((- event.rel[1]) / 5.0))
    return True
