chieffancypants / angular-hotkeys

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

Improve Documentation of directive-based hotkeys #274

Open molerat619 opened 6 years ago

molerat619 commented 6 years ago

Reading the documentation, it is not clear to me how to use the directive-based hotkeys.

I want to use them on a link so there is no function in the scope that I would want to call. So the example of <modal title="Modal Title" hotkey="{esc: close}"> does not offer a solution for that simple case.

How can I make a keystroke click a simple button or link that then takes the user wherever?

aramando commented 6 years ago

Directive-based hotkey definitionss have to refer to a function on the scope. You need to create one to do what you want if there isn't one already.