Reputation: 3
I am working with PyGame for the first time, and I haven't been able to find any way to handle event in a non-blocking way. For instance if I am playing a game with a character moving according to key pressing, I want the character to move continuously if I maintain the key pressed, and not having to release the key each time.
I am starting to think it is not possible with PyGame, am I right ?
Thanks.
Upvotes: 0
Views: 732
Reputation: 353
Maybe you can use pygame.key.set_repeat() which sends multiple keydown events when you hold down a key; From here: https://www.pygame.org/docs/ref/key.html
Upvotes: 1