I've written a simple code using pygame just to test a situation where a player uses key presses and mouse motion simultaneously. However, I'm unable to move the mouse while pressing a key. The code is below:
import pygame
from pygame.locals import *
from sys import exit
pygame.init()
pygame.display.set_mode((640, 480))
while True:
for event in pygame.event.get():
if event.type == QUIT:
exit()
key = pygame.key.get_pressed()
mouse = pygame.mouse.get_pos()
pygame.display.update()
Thank you very much. Despite the simplicity of the question, Google couldn't find anything.