Fix shortcut label on welcome screen: "Control" -> "Ctrl"

This commit is contained in:
Keavon Chambers 2022-08-11 10:53:03 -07:00
parent cf6bbcfd30
commit 47aaaf89d7
2 changed files with 8 additions and 8 deletions

View File

@ -78,14 +78,14 @@ import { MenuEntry, UpdateMenuBarLayout, MenuListEntry, KeyRaw, KeysGroup } from
import MenuList from "@/components/floating-menus/MenuList.vue"; import MenuList from "@/components/floating-menus/MenuList.vue";
import IconLabel from "@/components/widgets/labels/IconLabel.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 // 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 controlOrCommand = platformIsMac() ? "Command" : "Control"; const accelKey = platformIsMac() ? "Command" : "Control";
const LOCK_REQUIRING_SHORTCUTS: KeyRaw[][] = [ const LOCK_REQUIRING_SHORTCUTS: KeyRaw[][] = [
[controlOrCommand, "KeyW"], [accelKey, "KeyW"],
[controlOrCommand, "KeyN"], [accelKey, "KeyN"],
[controlOrCommand, "Shift", "KeyN"], [accelKey, "Shift", "KeyN"],
[controlOrCommand, "KeyT"], [accelKey, "KeyT"],
[controlOrCommand, "Shift", "KeyT"], [accelKey, "Shift", "KeyT"],
]; ];
type FrontendMenuColumn = { type FrontendMenuColumn = {

View File

@ -262,7 +262,7 @@ export default defineComponent({
const ALT: Key = { key: "Alt", label: "Alt" }; const ALT: Key = { key: "Alt", label: "Alt" };
const COMMAND: Key = { key: "Command", label: "Command" }; 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]; if (platformIsMac()) return reservedKey ? [ALT, COMMAND] : [COMMAND];
return reservedKey ? [CONTROL, ALT] : [CONTROL]; return reservedKey ? [CONTROL, ALT] : [CONTROL];