ngneat/hotkeys

Removing / un-registering hotkeys

alvaromartmart opened this issue · 2 comments

I'm submitting a...


[ ] Regression (a behavior that used to work and stopped working in a new release)
[ ] Bug report  
[ ] Performance issue
[x] Feature request
[ ] Documentation issue or request
[ ] Support request
[ ] Other... Please describe:

Current behavior

Hotkeys can be added programatically using HotkeyService.addShortcut, but they can't be un-registered.

Expected behavior

A HotkeyService.removeShortcut allowing to delete shortcuts would be nice.

Minimal reproduction of the problem with instructions

What is the motivation / use case for changing the behavior?

I'm using the library to implement a functionality where the users can assign hotkeys to specific actions. This is done through a custom service that keeps track of keyboard assignments, so I need a way to un-register hotkeys.

Environment


Angular version: X.Y.Z


Browser:
- [ ] Chrome (desktop) version XX
- [ ] Chrome (Android) version XX
- [ ] Chrome (iOS) version XX
- [ ] Firefox version XX
- [ ] Safari (desktop) version XX
- [ ] Safari (iOS) version XX
- [ ] IE version XX
- [ ] Edge version XX
 
For Tooling issues:
- Node version: XX  
- Platform:  

Others:

Sure. Do you want to submit a PR?

Sure! I think I can come up with something in a couple of days, I'll keep you posted