import pygame from pygame.locals import * import sys pygame.init() display = pygame.display.set_mode((1000,1000)) FPS_CLOCK = pygame.time.Clock() while 1: for event in pygame.event.get(): if event.type == QUIT: pygame.quit() sys.exit() print("Current pos", pygame.mouse.get_pos()) print("Mouse change pos", pygame.mouse.get_rel()) pygame.display.update() FPS_CLOCK.tick(2)