Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add the possibility to remove all shortcuts #2031

Closed
TitusKirch opened this issue Aug 10, 2024 · 1 comment
Closed

Add the possibility to remove all shortcuts #2031

TitusKirch opened this issue Aug 10, 2024 · 1 comment
Labels
enhancement New feature or request v3 #1289 wontfix-v2 This will not be fixed in `v2.x`.

Comments

@TitusKirch
Copy link

Description

Currently I don't see a way to remove all shortcuts. I found this issue here #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

@benjamincanac
Copy link
Member

@smarroufin Do you know if this is possible with the new defineShortcuts composable in v3?

@benjamincanac benjamincanac added wontfix-v2 This will not be fixed in `v2.x`. v3 #1289 and removed triage labels Dec 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request v3 #1289 wontfix-v2 This will not be fixed in `v2.x`.
Projects
None yet
Development

No branches or pull requests

2 participants