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