import pygame from pygame.locals import * import sys pygame.init() display = pygame.display.set_mode((500,500)) FPS_CLOCK = pygame.time.Clock() State = 1 while 1: for event in pygame.event.get(): if event.type == QUIT: pygame.quit() sys.exit() if event.type == pygame.KEYDOWN: if event.key == pygame.K_1 : pygame.mouse.set_cursor(pygame.SYSTEM_CURSOR_ARROW) if State != 1 : print("Cursor") State = 1 if event.key == pygame.K_2 : pygame.mouse.set_cursor(pygame.SYSTEM_CURSOR_HAND) if State != 2 : print("Hand") State = 2 pygame.display.update() FPS_CLOCK.tick(30)