[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
Re: [pygame] event.get(), event.poll() only return keyup/keydown while mouse is moving
- To: pygame-users@xxxxxxxx
- Subject: Re: [pygame] event.get(), event.poll() only return keyup/keydown while mouse is moving
- From: luke p <rabidpoobear@xxxxxxxxx>
- Date: Tue, 17 May 2005 15:10:02 -0500
- Delivered-to: archiver@seul.org
- Delivered-to: pygame-users-outgoing@seul.org
- Delivered-to: pygame-users@seul.org
- Delivery-date: Tue, 17 May 2005 16:10:23 -0400
- Domainkey-signature: a=rsa-sha1; q=dns; c=nofws;        s=beta; d=gmail.com;        h=received:message-id:date:from:reply-to:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references;        b=Mx6zbKB6Iwqum0YF9mLWzWzNOykmjQGB1L4TPdyfg5KkzMkQvO4gMn9LB3YyYw3L90VTYMeP+J3RjTV3NY0oSaUWTwPCUkqzSA0DeSnT74slzmUVotcKngOwopHoKaH4KEvH70UOjktt6Qb67p0osp2HOoIGro0qMPLDuBE2BpA=
- In-reply-to: <428A0C77.3080207@chascosoft.com>
- References: <428A0C77.3080207@chascosoft.com>
- Reply-to: pygame-users@xxxxxxxx
- Sender: owner-pygame-users@xxxxxxxx
are you calling __poll_pygame in a loop?  pygame.event.get() only gets
the currently queued keypresses, it doesn't just sit there getting
events.  You have to call it.  so maybe you are only calling
__poll_pygame when the mouse is moving or something of that sort.  By
the way, why are you using __'s for naming your functions? just
curious.
On 5/17/05, Patrick Chasco <patrick@xxxxxxxxxxxxxx> wrote:
> I'm having a problem with event.get() and event.poll(). It seems that
> these two functions will only return KEYUP/KEYDOWN events while the
> mouse is moving over the pygame window, or moving at all while in
> fullscreen mode. event.wait() works as intended.
> 
> Here's the code:
> [from engine.py]
> def __init_engine(self, mode, fullscreen):
>    pygame.init()
>    if fullscreen:
>        fullscreen = pygame.FULLSCREEN
>    self.screen = pygame.display.set_mode(mode, fullscreen)
> 
> [from event.py]
> def __poll_pygame(self):
>    for e in pygame.event.get():
>        print e.type
> 
> Anybody have any ideas?
>