diff --git a/src/io/keyboard.js b/src/io/keyboard.js index 10b1d8fca..124d9ed6f 100644 --- a/src/io/keyboard.js +++ b/src/io/keyboard.js @@ -85,7 +85,7 @@ class Keyboard { keyArg = Cast.toString(keyArg); // If the arg matches a special key name, return it. - const keyNameList = Object.values(Keyboard.KEY_NAMES); + const keyNameList = Object.keys(Keyboard.KEY_NAMES).map(name => Keyboard.KEY_NAMES[name]); if (keyNameList.includes(keyArg)) { return keyArg; }