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

RE: [pygame] Key Presses



See also:
https://coderanger.net/browser/school/2007/fall/egd/magnoball/gui.py#L66

--Noah

> -----Original Message-----
> From: owner-pygame-users@xxxxxxxx [mailto:owner-pygame-users@xxxxxxxx]
> On Behalf Of Nicholas Dudfield
> Sent: Tuesday, August 19, 2008 10:19 AM
> To: pygame-users@xxxxxxxx
> Subject: Re: [pygame] Key Presses
> 
> Actually a black list approach would be better rather than a white
> list.
> Can you post the approach you end up going with? Would be of interest..
> Sleepy times
> 
> Good luck.
> 
> Ian Mallett wrote:
> > Yes, but:
> >
> > key = pygame.key.get_pressed()
> > pygame.event.get()
> > if key[pygame.K_QUESTION]: print "Question"
> >
> > in the event handler does nothing when I press the question mark key
> > (whose primary (non-shift) function is "/").  The same goes for "!"
> > (primary purpose "1") among still others.
> >
> > Ian