ngneat / hotkeys

🤖 A declarative library for handling hotkeys in Angular applications
https://netbasal.com/diy-keyboard-shortcuts-in-your-angular-application-4704734547a2
MIT License
329 stars 17 forks source link

Pause hotkey handling #62

Open timnyborg opened 2 years ago

timnyborg commented 2 years ago

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

It is impossible (?) to temporarily disable the handling of hotkeys.

Expected behavior

Run hotkeysService.pause() to temporarily interrupt the handling of hotkeys, and .unpause() to resume handling.

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

When I display modals in my application, I want to prevent any hotkeys until they are dismissed. It's a simple change, so I'm happy to put together a PR if the functionality would be welcome.

NetanelBasal commented 2 years ago

You're welcome to submit a PR

Tweniee commented 11 months ago

@NetanelBasal is this feature implemented or open? attempt/#62