[Refactor] Move keybinds extension to keybindingService (#2063)

This commit is contained in:
Chenlei Hu
2024-12-26 13:19:04 -05:00
committed by GitHub
parent 7990491c58
commit c311806249
4 changed files with 64 additions and 66 deletions

View File

@@ -42,6 +42,8 @@ import { SERVER_CONFIG_ITEMS } from '@/constants/serverConfig'
import { useMenuItemStore } from '@/stores/menuItemStore'
import { useCommandStore } from '@/stores/commandStore'
import { useCoreCommands } from '@/hooks/coreCommandHooks'
import { useEventListener } from '@vueuse/core'
import { useKeybindingService } from '@/services/keybindingService'
setupAutoQueueHandler()
@@ -160,6 +162,8 @@ onBeforeUnmount(() => {
executionStore.unbindExecutionEvents()
})
useEventListener(window, 'keydown', useKeybindingService().keybindHandler)
const onGraphReady = () => {
requestIdleCallback(
() => {