diff --git a/src/zen/kbs/ZenKeyboardShortcuts.mjs b/src/zen/kbs/ZenKeyboardShortcuts.mjs index 82653c77a..8073afd22 100644 --- a/src/zen/kbs/ZenKeyboardShortcuts.mjs +++ b/src/zen/kbs/ZenKeyboardShortcuts.mjs @@ -32,7 +32,6 @@ const KEYCODE_MAP = { TAB: "VK_TAB", ENTER: "VK_RETURN", ESCAPE: "VK_ESCAPE", - SPACE: "VK_SPACE", ARROWLEFT: "VK_LEFT", ARROWRIGHT: "VK_RIGHT", ARROWUP: "VK_UP", @@ -560,7 +559,13 @@ class KeyShortcut { static keyToDisplayString(key, keycode) { let str = ""; if (key) { - str += key.toUpperCase(); + switch (key) { + case " ": + str += AppConstants.platform == "macosx" ? "␣" : "Space"; + break; + default: + str += key.toUpperCase(); + } } else if (keycode) { // Get the key from the value for (let [k, value] of Object.entries(KEYCODE_MAP)) { @@ -585,9 +590,6 @@ class KeyShortcut { case "enter": str += AppConstants.platform == "macosx" ? "↩" : "Enter"; break; - case "space": - str += AppConstants.platform == "macosx" ? "␣" : "Space"; - break; default: str += normalizedKey; }