This confused me too, at first. It did not seem to be anywhere in the
docs.
When you set up the game, do:
keyboard = pyglet.window.key.KeyStateHandler()
window.push_handlers(keyboard)
Then use it like this:
if keyboard[key.LEFT]:
....
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"pyglet-users" 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/pyglet-users?hl=en
-~----------~----~----~----~------~----~------~--~---