What if I told you that you could use any gamepad ever to control webpages or web games in JS?
window.addEventListener( 'gamepadconnected', function(e) {
console.log( e.gamepad.id );
} );
Following you can get movement for joysticks axes and button presses.
use requestAnimationFrame() to get updates from any gamepad
Github Link: https://github.com/bibixx/reveal.js-gamepad-plugin