Connect the controller once. Future connections will happen automatically.
The A, B, X, and Y buttons are controlled by the Gamepad API.
The Assistant and the Capture buttons are controlled by the WebHID API.
Raw HID data: