pxt-arcade 1.13.47 → 1.13.48

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/built/sim.js CHANGED
@@ -274,6 +274,10 @@ var pxsim;
274
274
  return false;
275
275
  };
276
276
  window.onkeydown = function (e) {
277
+ if (e.key === "Unidentified") {
278
+ // This is a synthetic keyboard event derived from another input source (e.g. gamepad), ignore.
279
+ return;
280
+ }
277
281
  const b = board();
278
282
  if (b) {
279
283
  const key = typeof e.which == "number" ? e.which : e.keyCode;
@@ -287,6 +291,10 @@ var pxsim;
287
291
  });
288
292
  };
289
293
  window.onkeyup = function (e) {
294
+ if (e.key === "Unidentified") {
295
+ // This is a synthetic keyboard event derived from another input source (e.g. gamepad), ignore.
296
+ return;
297
+ }
290
298
  const b = board();
291
299
  if (b) {
292
300
  const key = typeof e.which == "number" ? e.which : e.keyCode;