def ps4_controller(): Controller.listen(timeout=60, on_connect=ps4_controller_connect, on_disconnect=ps4_controller_disconnect)
from pyPS4Controller.controller import Controller if __name__ == '__main__': controller = Controller(interface="/dev/input/js0", connecting_using_ds4drv=False) controller.listen()