ui icon indicating copy to clipboard operation
ui copied to clipboard

Add the possibility to remove all shortcuts

Open TitusKirch opened this issue 1 year ago • 0 comments

Description

Currently I don't see a way to remove all shortcuts. I found this issue here https://github.com/nuxt/ui/issues/693, which is more about changing the shortcuts.

Maybe a simple and easy solution would be that defineShortcuts returns useEventListener('keydown', onKeyDown), which (according to https://vueuse.org/core/useEventListener/) allows you to unregister the event listener.

E.g.:

const cleanupShortcuts = defineShortcuts({
  // shortcuts here
})

// something else

cleanupShortcuts()

Additional context

No response

TitusKirch avatar Aug 10 '24 20:08 TitusKirch