[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
Re: [pygame] key objets
Michal Molhanec wrote:
> Gerrit Holl wrote:
> >Hmm, I didn't know .unicode but it seems it is only defined if it is a
> >character: so for arrows, function keys, etc., it seems not to be defined.
>
> IMHO it seems to be defined with value of u'' so things like isalpha()
> still works
You are right. Still, I think it would be nice to have a Key object or
similar on which you could do .isarrow(), .isfunc(), etc. I'm not really
sure whether it is correct to use string checks on keys, because I don't
know whether a key should be treated as a character. But the .unicode
attribute is handy indeed. Thanks.
yours,
Gerrit.
--
169. If he be guilty of a grave fault, which should rightfully deprive
him of the filial relationship, the father shall forgive him the first
time; but if he be guilty of a grave fault a second time the father may
deprive his son of all filial relation.
-- 1780 BC, Hammurabi, Code of Law
--
Asperger Syndroom - een persoonlijke benadering:
http://people.nl.linux.org/~gerrit/
Het zijn tijden om je zelf met politiek te bemoeien:
http://www.sp.nl/