pyglet on_key_press code example
Example: pyglet on button press
@win.event
def on_key_press(key, modifiers):
if key == pyglet.window.key.UP:
print("UP")
@win.event
def on_key_press(key, modifiers):
if key == pyglet.window.key.UP:
print("UP")