1

I have a issue where pygame does not detect the a key getting pressed when I press ctrl, shift and a simultaneously. which is a problem in my game.

is there any solution or work-around for this problem? I pasted some example code below to show how I detect key input. I looked around but couldn't find any solution.

ps: it's not my keyboards fault it has a 10 key rollover and ctrl + shift + d works fine so it must be something else

import pygame

pygame.init()
screen = pygame.display.set_mode((500,500))
while True:
   pygame.event.get()
   events = pygame.key.get_pressed()


   if events[pygame.K_a]:
       
       #do something

   if events[pygame.K_d]:
       
       #do something

   pygame.display.flip()
Reezardo
  • 33
  • 4

0 Answers0