From 2c5bfac439a5909b7a97453aa8144ea41d89e60e Mon Sep 17 00:00:00 2001 From: algerkong Date: Wed, 23 Apr 2025 09:05:24 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=A7=20chore:=20=E7=A7=BB=E9=99=A4?= =?UTF-8?q?=E4=B8=8D=E5=86=8D=E4=BD=BF=E7=94=A8=E7=9A=84=E5=BF=AB=E6=8D=B7?= =?UTF-8?q?=E9=94=AE=E5=88=9D=E5=A7=8B=E5=8C=96=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/renderer/App.vue | 3 --- src/renderer/utils/shortcut.ts | 10 ---------- 2 files changed, 13 deletions(-) delete mode 100644 src/renderer/utils/shortcut.ts diff --git a/src/renderer/App.vue b/src/renderer/App.vue index b87d9f6..0d7ca14 100644 --- a/src/renderer/App.vue +++ b/src/renderer/App.vue @@ -26,7 +26,6 @@ import { isElectron, isLyricWindow } from '@/utils'; import { initAudioListeners } from './hooks/MusicHook'; import { isMobile } from './utils'; import { useAppShortcuts } from './utils/appShortcuts'; -import { initShortcut } from './utils/shortcut'; const { locale } = useI18n(); const settingsStore = useSettingsStore(); @@ -120,8 +119,6 @@ onMounted(async () => { window.api.sendSong(cloneDeep(playerStore.playMusic)); } } - // 初始化快捷键 - initShortcut(); }); diff --git a/src/renderer/utils/shortcut.ts b/src/renderer/utils/shortcut.ts deleted file mode 100644 index 6757b94..0000000 --- a/src/renderer/utils/shortcut.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { isElectron } from '.'; -import { handleShortcutAction } from './appShortcuts'; - -export function initShortcut() { - if (isElectron) { - window.electron.ipcRenderer.on('global-shortcut', async (_, action: string) => { - handleShortcutAction(action); - }); - } -}