kaplayjs / kaplay

🦖 A JavaScript/TypeScript Game Library that feels like a game. Make games fast, fun and fanstastic.
https://kaplayjs.com
MIT License
450 stars 33 forks source link

bug: buttons weirdness #421

Open dragoncoder047 opened 3 weeks ago

dragoncoder047 commented 3 weeks ago
kaplay({ buttons: { foo: { keyboard: ["q", "w"] } } });
onButtonDown("foo", () => debug.log("foo"));
  1. press both q and w
  2. release one of them, hold the other
  3. the foo stops getting logged, even though you are holding a valid button binding down
lajbel commented 2 weeks ago

I mean, its how Set work, I think to fix it in 4000 will make it a Map, so when you release q, and hold w, it doesn't loose register.

Also what should happen between devices? mantain? no? Should be optionable?