diff --git a/scripts/system/libraries/entityCameraTool.js b/scripts/system/libraries/entityCameraTool.js index fb808cc7ea..f554f45722 100644 --- a/scripts/system/libraries/entityCameraTool.js +++ b/scripts/system/libraries/entityCameraTool.js @@ -77,17 +77,17 @@ CameraManager = function() { } var keyToActionMapping = { - "a": "orbitLeft", - "d": "orbitRight", - "w": "orbitForward", - "s": "orbitBackward", - "e": "orbitUp", - "c": "orbitDown", - - "LEFT": "orbitLeft", - "RIGHT": "orbitRight", - "UP": "orbitForward", - "DOWN": "orbitBackward", + 65: "orbitLeft", // "a" + 68: "orbitRight", // "d" + 87: "orbitForward", // "w" + 83: "orbitBackward", // "s" + 69: "orbitUp", // "e" + 67: "orbitDown", // "c" + + 16777234: "orbitLeft", // "LEFT" + 16777236: "orbitRight", // "RIGHT" + 16777235: "orbitForward", // "UP" + 16777237: "orbitBackward", // "DOWN" } var CAPTURED_KEYS = []; @@ -96,7 +96,7 @@ CameraManager = function() { } function getActionForKeyEvent(event) { - var action = keyToActionMapping[event.text]; + var action = keyToActionMapping[event.key]; if (action !== undefined) { if (event.isShifted) { if (action === "orbitForward") {