chieffancypants / angular-hotkeys

Configuration-centric keyboard shortcuts for your Angular apps.
http://chieffancypants.github.io/angular-hotkeys/
MIT License
1.68k stars 248 forks source link

start/stop listening for all keys #206

Open karanba opened 8 years ago

karanba commented 8 years ago

there need a way to say stop/continue for listening. For example if there is an modal already on screen I do not want to enable other shortcuts do action..

maksimr commented 8 years ago

Agree, It will be nice to have something like isolate shortcuts, which will disable other shortcuts

mkoczorowski commented 8 years ago

you can unbind and then rebind keys form the scope

juliadou commented 8 years ago

+1. It will be very nice to disable hotkeys when a dialog is open so the hotkeys won't trigger callbacks which affect the UI under the dialog backdrop.

newzen commented 8 years ago

+1. have same problem with modal popup, some key used are used too in backdrop.

vir2bille commented 8 years ago

There are methods pause() and unpause() in API

sohail85 commented 8 years ago

Is there a way to overcome this issue? since my hotkeys bounded to scope and controllers scope will not be destroyed since there are not route change while opening a stateless dialog, it will still run the hotkeys call back when the dialog is open and separate set of hotkeys been register on dialog (cheetshet display hotkeys of dialog as well as the page on top of which the dialog is currently open). expected behavior is to only have dialog related hotkeys and page related hotkeys need to be unregistered or disabled