[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [pygame] Re: pygame key repeat



Heh, we're all basically repeating each other, here.

Anyway, the way to use get_pressed is to drop it into a variable, then
index into it with the pygame.K_* constants.

keys = pygame.key.get_pressed()
if keys[pygame.K_UP]:
  pass # Up key is down

etc.