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

Re: [pygame] Inverse function to pygame.key.name?



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Greg Ewing wrote:
> Ethan Glasser-Camp wrote:
>> We can get these strings, e.g. by using the
>> pygame.key.name function. but I don't know how to translate that
>> string back into a pygame.constant.
> 
> Why would you need to do that? Instead of translating the
> string to a key number to compare with user input, why
> not convert the user input to a string and compare with
> that?

Oh, yeah. :) Why didn't I think of that?

Thanks,

Ethan
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFGpvJXhRlgoLPrRPwRAgiHAJ0TfItgieDTTOXsR8x/xbCVuTdbYQCfQkxT
iBC6uv6u4IS9rRtdMvZA75M=
=Gl8q
-----END PGP SIGNATURE-----