fix: Update command key in keyboard shortcuts modal (#2208)

zio/stable
Aaron Ransley 2023-07-10 03:32:15 -06:00 committed by GitHub
parent 2506c02c39
commit ae35f9d11d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 1 deletions

View File

@ -21,6 +21,9 @@ interface ShortcutItemGroup {
items: ShortcutItem[] items: ShortcutItem[]
} }
const isMac = useIsMac()
const modifierKeyName = $computed(() => isMac.value ? '⌘' : 'Ctrl')
const shortcutItemGroups: ShortcutItemGroup[] = [ const shortcutItemGroups: ShortcutItemGroup[] = [
{ {
name: t('magic_keys.groups.navigation.title'), name: t('magic_keys.groups.navigation.title'),
@ -52,7 +55,7 @@ const shortcutItemGroups: ShortcutItemGroup[] = [
items: [ items: [
{ {
description: t('magic_keys.groups.actions.command_mode'), description: t('magic_keys.groups.actions.command_mode'),
shortcut: { keys: ['cmd', '/'], isSequence: false }, shortcut: { keys: [modifierKeyName, '/'], isSequence: false },
}, },
{ {
description: t('magic_keys.groups.actions.compose'), description: t('magic_keys.groups.actions.compose'),