Hi,
Yes, you were correct, it was easy... I found me some helpful functions
in the pyglet.window.key module.
For the sake of posterity, here is my code:
@window.event
def on_key_press(symbol, modifiers):
"""Handle a keydown event."""
modifiers &= ~(key.MOD_SCROLLLOCK | key.MOD_NUMLOCK | key.MOD_CAPSLOCK)
if modifiers:
key_str = key.modifiers_string(modifiers) + '+'
else:
key_str = ''
key_str += key.symbol_string(symbol)
...
Cheers,
On 08/12/2016 10:21, Benjamin Moran wrote:
Nothing built-in, but it should only take a few lines of code to accomplish
what you want.
-Ben
--
You received this message because you are subscribed to the Google Groups
"pyglet-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/pyglet-users.
For more options, visit https://groups.google.com/d/optout.