
import pyglet
import imgui
class TEST:
    def __init__(self):
        self.window = pyglet.window.Window(
            width=500,
            height=500,
            vsync=False,
            resizable=False
        )
        self.window.on_key_press = self._on_key_press
        self.window.on_key_release = self._on_key_release
        
    def _on_key_press(self, symbol, modifiers):
        print("press:",symbol)

    def _on_key_release(self, symbol, modifiers):
        print("release:",symbol)

test = TEST()
pyglet.app.run()
while True:
    a = 1