angular2-hotkeys icon indicating copy to clipboard operation
angular2-hotkeys copied to clipboard

Don't remove cheatsheet hotkey on .remove()

Open VangelisAlSghir opened this issue 7 years ago • 1 comments

Is there a possibility to not remove the cheatsheet hotkey if you call hotkeysService.remove()?

Since my hotkeys have different tasks on each page, I always call .remove() in my ngOnDestroy of my components. But this also removes the hotkey trigger for the cheatsheet.

I could solve this issue with an array of my hotkeys and give it as a parameter to the remove() function. Anyway I think it would be reasonable not to delete the hotkey for cheatsheet on calling .remove() so you can always just call .remove() if you want to destroy your own hotkeys.

VangelisAlSghir avatar Aug 30 '18 14:08 VangelisAlSghir

This is something I've been pondering for myself as well actually. I'm currently doing the saving of hotkeys to pass to remove() but it's kind of annoying.

I'm not sure when I'll get around to it, been very busy lately, but this one is fairly high on my own wishlist so hopefully won't take too long. :)

wittlock avatar Aug 30 '18 21:08 wittlock