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

Re: [pygame] confusing documentation



Ivo Danihelka wrote:

Hi,

Pygame documentation suggests to call pygame.event.get([KEYDOWN,KEYUP]) to get all the keyboard events.
This is not always the right way, because the other events will remain
in the queue. SDL queue could contain max 128 unprocessed events,
additional events will be ignored.


The right way is to get all events by pygame.event.get() or some other way.

The documentation:
http://www.pygame.org/docs/ref/pygame_event.html#get


You could use event.set_allowed() and/or event.set_blocked() to let SDL
know which events you're interested in.

Best regards,

Troels Therkelsen
begin:vcard
fn:Troels Therkelsen
n:Therkelsen;Troels
org:Nitram Lexa
adr:;;Danmarksvej 5A;Kongens Lyngby;;2800;Denmark
email;internet:tt@xxxxxxxxxxxxxx
title:Programmer
tel;work:+45 70 25 24 23
tel;fax:+45 70 25 29 23
tel;home:+45 38 81 33 66
tel;cell:+45 25 39 14 69
x-mozilla-html:FALSE
url:http://www.nitramlexa.com
version:2.1
end:vcard