Explorar o código

快捷键调整

pipipi-pikachu %!s(int64=5) %!d(string=hai) anos
pai
achega
6a7430810b
Modificáronse 1 ficheiros con 3 adicións e 2 borrados
  1. 3 2
      src/views/Editor/useHotkey.ts

+ 3 - 2
src/views/Editor/useHotkey.ts

@@ -87,7 +87,8 @@ export default () => {
   }
 
   const keydownListener = (e: KeyboardEvent) => {
-    const { ctrlKey, shiftKey } = e
+    const { ctrlKey, shiftKey, metaKey } = e
+
     const key = e.key.toUpperCase()
 
     if(ctrlKey && !ctrlKeyActive.value) store.commit(MutationTypes.SET_CTRL_KEY_STATE, true)
@@ -101,7 +102,7 @@ export default () => {
     
     if(!editorAreaFocus.value && !thumbnailsFocus.value) return      
 
-    if(ctrlKey && key === KEYS.C) {
+    if((ctrlKey || metaKey) && key === KEYS.C) {
       if(disableHotkeys.value) return
       e.preventDefault()
       copy()