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); - }); - } -}