Input with Pygame

Hello! I have a strange issue where my input with pygame is only detected while using my control key on my Mac. I am using the Apple Silicon Model. It will detect the arrow keys, but it will not detect any other key on the keyboard without me simultaneously holding control.

The code for reference:

# if a keystroke is inputted
if event.type == pygame.KEYDOWN:
if event.key == pygame.K_LEFT:
playerX_change = -5
if event.key == pygame.K_RIGHT:
playerX_change = 5
if event.key == pygame.K_SPACE:
fire_bullet(playerX, bulletY)
if event.type == pygame.KEYUP:
if event.key == pygame.K_LEFT or event.key == pygame.K_RIGHT:
playerX_change = 0

Please sign in to leave a comment.