On Jan 14, 4:13 pm, "Kao Cardoso Felix" <[email protected]> wrote:
> Pyglet's site decided to work again for me, so just a few corrections:
>
> from pyglet.window.key import KeyStateHandler
>
> keys = KeyStateHandler()
> director.window.push_handlers(keys)
>
> # During you're game:
> if keys[key_code]:
>      # do something
>

Thank you. I will give this a try.

My assumption is that using this method will bypass director
completely and, therefore, I will lose access to some of director's
special key handling of MOD_ACCEL + piglet.window.key.?

I guess that's OK.

(Looking at director.py, it seems easy enough to modify it so that
ESCAPE handling was optional but not something I would undertake.
Maybe a good feature request.)

Thanks again!



--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"cocos2d discuss" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/cocos-discuss?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to