[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
Re: [pygame] How to get capital letters from key event
- To: pygame-users@xxxxxxxx
- Subject: Re: [pygame] How to get capital letters from key event
- From: Randy Kaelber <randy@xxxxxxxxxxxx>
- Date: Thu, 1 Dec 2005 16:17:11 -0700
- Delivered-to: archiver@seul.org
- Delivered-to: pygame-users-outgoing@seul.org
- Delivered-to: pygame-users@seul.org
- Delivery-date: Thu, 01 Dec 2005 18:17:21 -0500
- In-reply-to: <1133478714.14780.3.camel@localhost.homelan>
- References: <f495db580511291756j4a7ae797hb0957763c0cb2542@mail.gmail.com> <f495db580511291816o5c634474w3aea6be175a864b5@mail.gmail.com> <383b6d6f0511292354g10285f4cidec1fae246a933a8@mail.gmail.com> <438DA62C.7000904@softwave.se> <1133366099.10529.14.camel@localhost.localdomain> <f495db580511300934x4171ace7w93cbc8995bef5062@mail.gmail.com> <438DEBFF.4030804@softwave.se> <f495db580511301047t4f4f29a1hcc7577228582cc20@mail.gmail.com> <f495db580511301111m31838c10pf1bfc225c3c3a601@mail.gmail.com> <1133478714.14780.3.camel@localhost.homelan>
- Reply-to: pygame-users@xxxxxxxx
- Sender: owner-pygame-users@xxxxxxxx
- User-agent: Mutt/1.4.1i
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