The controller widget automatically detects connected gamepad and joysticks
In [ ]:
from ipywidgets import Controller
In [ ]:
Controller()
In the case where multiple controllers are connected, you may address the controllers by index
In [ ]:
Controller(index=1)