Pygame works much, much better with event-based input, rather than polling. If you really want to use polling, you'd be better off keeping your own list of pressed/released keys and updating them every frame.
A single list could handle that, if you use ints with different values for pressed / down / up / released. I'd go with 1 bit for down/up, and one for the state in the previous frame, but whatever works.
-- Audiogames-reflector mailing list Audiogamesemail@example.com https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector