Change the way the isAlt check is done to support "AltLeft". Also use "downKeys" instead of "_downKeys" because it will be deprecated in v10.
It was:
const alt = new Set(["Alt"]);
return (isSuperset(alt,game.keyboard._downKeys) && isSuperset(game.keyboard._downKeys,alt));
which because of the checking with isSuperset in both "directions" would match when just the "alt" key was pressed (which was intended). But it also makes more complex introducing new names for alt keys, like "AltLeft".
which as far as I know has the same behavior of working only when just "alt" is pressed (because we check for length == 1) but let us define "other" alt keys.
For the switch from _downKeys to downKeys it was according to this warning message in the browser console: "Deprecated in favor of `downKeys`. Will be removed in V10."
Change the way the isAlt check is done to support "AltLeft". Also use "downKeys" instead of "_downKeys" because it will be deprecated in v10.
It was:
which because of the checking with isSuperset in both "directions" would match when just the "alt" key was pressed (which was intended). But it also makes more complex introducing new names for alt keys, like "AltLeft".
It was changed to:
which as far as I know has the same behavior of working only when just "alt" is pressed (because we check for length == 1) but let us define "other" alt keys.
For the switch from _downKeys to downKeys it was according to this warning message in the browser console: "Deprecated in favor of `downKeys`. Will be removed in V10."