import pygame


def process_events():
    for event in pygame.event.get():
        if event.type == pygame.QUIT:
            quit()
        keys = pygame.key.get_pressed()
        if keys[pygame.K_ESCAPE]:
            if keys[pygame.K_LSHIFT] or keys[pygame.K_RSHIFT]:
                from menu import program
                program()
        if keys[pygame.K_TAB]:
            quit()
    return False
