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

Re: [pygame] How to get capital letters from key event



On Fri, Dec 02, 2005 at 12:11:54AM +0100, Julien Peeters wrote:
> Hello everybody,
> 
> I am implementing a TextLabel widget with pygame but I can't get capital
> letters. I get the name of pressed key with pygame.key.name(event.key),
> but when I pressed Shift+<letter> I do not get I expect. 
> 
> Do have I use a FIFO ?


Try pygame.key.get_mods()  and you can tell if shift (or ctrl and alt for 
that matter) are down.

> 
> Thanks for answers.
> 

-- 
Randy Kaelber                                        randy@xxxxxxxxxxxx
Scientific Software Engineer  
Mars Space Flight Facility, Department of Geological Sciences
Arizona State University, Tempe, Arizona, USA