fix(defineShortcuts): return useEventListener to unregister the listener

Resolves #2031
This commit is contained in:
Benjamin Canac
2024-12-06 23:37:22 +01:00
parent 6c946dc0e7
commit 80befc107c

View File

@@ -202,5 +202,5 @@ export function defineShortcuts(config: MaybeRef<ShortcutsConfig>, options: Shor
}).filter(Boolean) as Shortcut[]
})
useEventListener('keydown', onKeyDown)
return useEventListener('keydown', onKeyDown)
}