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

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



In a message of Fri, 02 Dec 2005 10:31:30 +1100, Rene Dudfield writes:
>instead of pygame.ket.get_mods()
>
>Use the event.mod attribute of that key event.  Otherwise someone may
>quickly type aBcD and you might link the wrong keys up with which are
>caps or not.
>
>if event.mod & KMOD_SHIFT:
>    # it is a shifted key.
>
>More details here:
>http://www.pygame.org/docs/ref/key.html

Aha, I too did not know that.  Thank you.

Laura