File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed
Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -16,7 +16,9 @@ function detectApplePlatform() {
1616}
1717
1818export function usePlatformModifierKey ( ) {
19+ const { t } = useI18n ( )
1920 const isApplePlatform = useState ( 'platform:is-apple' , detectApplePlatform )
21+ const ctrlKeyLabel = computed ( ( ) => t ( 'shortcuts.ctrl_key' ) )
2022
2123 if ( import . meta. client ) {
2224 onMounted ( ( ) => {
@@ -26,7 +28,9 @@ export function usePlatformModifierKey() {
2628
2729 return {
2830 isApplePlatform : computed ( ( ) => isApplePlatform . value ) ,
29- primaryModifierKeyLabel : computed ( ( ) => ( isApplePlatform . value ? '⌘' : 'Ctrl' ) ) ,
30- commandPaletteShortcutLabel : computed ( ( ) => ( isApplePlatform . value ? '⌘ K' : 'Ctrl+K' ) ) ,
31+ primaryModifierKeyLabel : computed ( ( ) => ( isApplePlatform . value ? '⌘' : ctrlKeyLabel . value ) ) ,
32+ commandPaletteShortcutLabel : computed ( ( ) =>
33+ isApplePlatform . value ? '⌘ K' : `${ ctrlKeyLabel . value } +K` ,
34+ ) ,
3135 }
3236}
You can’t perform that action at this time.
0 commit comments