<reponame>TheCheapestPixels/panda3d-keybindings<gh_stars>0
from direct.showbase.ShowBase import ShowBase
from keybindings.device_listener import add_device_listener
from keybindings.device_listener import SinglePlayerAssigner


ShowBase()
add_device_listener(
    assigner=SinglePlayerAssigner(),
    task=False,
)


def read(task):
    base.device_listener.read(globalClock.dt)
    print(base.device_listener.read_context('demo_context'))
    return task.cont
base.add_task(read)


base.run()

from direct.showbase.ShowBase import ShowBase
from keybindings.device_listener import add_device_listener
from keybindings.device_listener import SinglePlayerAssigner


ShowBase()
add_device_listener(
    assigner=SinglePlayerAssigner(),
    task=False,
)


def read(task):
    base.device_listener.read(globalClock.dt)
    print(base.device_listener.read_context('demo_context'))
    return task.cont
base.add_task(read)


base.run()