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 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 = {

View file

@ -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];