Gamepad API events
Gamepad API
Introducing gamepad events, I'll let pictures spoke for them self:



I've tested it on Firefox, Chrome and Edge with success using an Xbox One Controller. Key events are ignored while at least one gamepad is connected.
This is still a draft as I await for your feedback and suggestions. Could someone with controllers of other vendors try this ?
Roadmap
- [ ] Table should show gamepad buttons / axes when a gamepad is connected.
- [ ] Verify responsiveness.
- [ ] ...
Tests
- [x] Xbox One controller
- [ ] Xbox Series X controller
- [ ] Dual Shock controller
- [ ] Joy-con controller
- [ ] ...
License
SVG comes from Gamepad W3C Editor's draft and is linked along with W3C license. Thanks @sgraham for the original asset.
@palashmon Eventually, is it ok to include my name with this contribution ? (see footer)
thats cool
man this is really cool! I'm sorry I didn't see this earlier! Will look a bit more into it
Thanks, I figure I may have refactored too much code...
I also noticed that you started a with-nextjs branch with React. If you feel this content is ok but need it on with-nextjs, I'd be more than happy to code it for React.