ng-keyboard-shortcuts icon indicating copy to clipboard operation
ng-keyboard-shortcuts copied to clipboard

How to dynamically add key shortcuts?

Open co-dax opened this issue 2 years ago • 3 comments

I have tried to add key shortcuts dynamically by adding new objects to the list binded to property "shortcuts" but it doesn't work. Documentation mentions in some places it is possible to do it. What am I supposed to do?

Thanks.

co-dax avatar Sep 08 '22 12:09 co-dax

would be best if you could provide a minimal reproduction repo, you can use the codesandbox here: https://codesandbox.io/s/yvyovny43v

omridevk avatar Sep 08 '22 12:09 omridevk

Here is an example https://codesandbox.io/s/ng-keyboard-shortcuts-example-forked-bi14kw?file=/src/app/app.component.ts Clicking on button "Add New Shortcut" should add a new shortcut "cmd + b" which should log related event but it does not happen.

Thanks!

co-dax avatar Sep 08 '22 13:09 co-dax

Thanks, I will look into it, thanks for reporting.

omridevk avatar Sep 08 '22 23:09 omridevk