From 47aaaf89d74d0b78d13a930bae565cc7a26dd401 Mon Sep 17 00:00:00 2001 From: Keavon Chambers Date: Thu, 11 Aug 2022 10:53:03 -0700 Subject: [PATCH] Fix shortcut label on welcome screen: "Control" -> "Ctrl" --- .../src/components/widgets/inputs/MenuBarInput.vue | 14 +++++++------- frontend/src/components/window/workspace/Panel.vue | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/frontend/src/components/widgets/inputs/MenuBarInput.vue b/frontend/src/components/widgets/inputs/MenuBarInput.vue index f77d65d4..fb60861f 100644 --- a/frontend/src/components/widgets/inputs/MenuBarInput.vue +++ b/frontend/src/components/widgets/inputs/MenuBarInput.vue @@ -78,14 +78,14 @@ import { MenuEntry, UpdateMenuBarLayout, MenuListEntry, KeyRaw, KeysGroup } from import MenuList from "@/components/floating-menus/MenuList.vue"; import IconLabel from "@/components/widgets/labels/IconLabel.vue"; -// TODO: Apparently, Safari does not support the Keyboard.lock() API but does relax its authority over certain keyboard shortcuts in fullscreen mode, which we should handle correctly -const controlOrCommand = platformIsMac() ? "Command" : "Control"; +// TODO: Apparently, Safari does not support the Keyboard.lock() API but does relax its authority over certain keyboard shortcuts in fullscreen mode, which we should take advantage of +const accelKey = platformIsMac() ? "Command" : "Control"; const LOCK_REQUIRING_SHORTCUTS: KeyRaw[][] = [ - [controlOrCommand, "KeyW"], - [controlOrCommand, "KeyN"], - [controlOrCommand, "Shift", "KeyN"], - [controlOrCommand, "KeyT"], - [controlOrCommand, "Shift", "KeyT"], + [accelKey, "KeyW"], + [accelKey, "KeyN"], + [accelKey, "Shift", "KeyN"], + [accelKey, "KeyT"], + [accelKey, "Shift", "KeyT"], ]; type FrontendMenuColumn = { diff --git a/frontend/src/components/window/workspace/Panel.vue b/frontend/src/components/window/workspace/Panel.vue index 39a442e2..fbb55b0a 100644 --- a/frontend/src/components/window/workspace/Panel.vue +++ b/frontend/src/components/window/workspace/Panel.vue @@ -262,7 +262,7 @@ export default defineComponent({ const ALT: Key = { key: "Alt", label: "Alt" }; const COMMAND: Key = { key: "Command", label: "Command" }; - const CONTROL: Key = { key: "Control", label: "Control" }; + const CONTROL: Key = { key: "Control", label: "Ctrl" }; if (platformIsMac()) return reservedKey ? [ALT, COMMAND] : [COMMAND]; return reservedKey ? [CONTROL, ALT] : [CONTROL];