pyglet on button 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")