omridevk / ng-keyboard-shortcuts

Dead Simple Keyboard Shortcuts Management for Angular
https://ng-keyboard-shortcuts.vercel.app/
147 stars 34 forks source link

Inquiry only : How we managed shortcut keys for the application #17

Closed ghost closed 5 years ago

ghost commented 5 years ago

Hi @omridevk - I just want to ask about how we can manage the shortcut key for the whole app.

Thanks a lot 👍 for any response.

omridevk commented 5 years ago

@JojiePalahang

  1. When you use the component, it registered the key globally, so if you have two in the same tree, they will override each other ( as long as they are both are not destroyed). But when a component that holds an is destroyed, so is the registered key associated with the component is removed from the global registry.
  2. Currently, the library does not support binding to the same shortcut, it will only trigger the first regisestered shortcut. However In the next release, we will add support for multiple binding for same shortcut. Please let me know if I answered your inquires and if so may I close this ticket? Thanks.
ghost commented 5 years ago

Thanks - Great yup it's clear now, we can now close this ticket.

petterkjeilen commented 4 years ago

Hi @omridevk Any news on support for binding to the same shortcut in multiple components ?

omridevk commented 4 years ago

Hi sorry for delay, I have a working local branch with multiple binding support, but I have an issue with making it work while keeping the debounce/throttle works, which is very important since it will a breaking change, if I can't get the debounce/throttle to work. I am still thinking of a solution for this. And again sorry for the delay, I had little time to maintain the library, but soon hopefully I will release a version. I will update my trello board and share it with you guys so you can keep track of the progress. Thanks again for the patience.