Skip to content

gamepad.disconnect

Disconnects the current gamepad instance.

This method removes the gamepad from the running UI environment. Useful when you need to simulate physically unplugging a controller.

  • Returns a promise that resolves once the gamepad is successfully disconnected.
describe('Gamepad tests', function () {
it('Disconnects a gamepad', async () => {
const gamepad = await gf.connectGamepad();
// Perform some interactions...
await gamepad.disconnect();
});
});