Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to dynamically add key shortcuts? #143

Open
co-dax opened this issue Sep 8, 2022 · 3 comments
Open

How to dynamically add key shortcuts? #143

co-dax opened this issue Sep 8, 2022 · 3 comments

Comments

@co-dax
Copy link

co-dax commented Sep 8, 2022

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.

@omridevk
Copy link
Owner

omridevk commented Sep 8, 2022

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

@co-dax
Copy link
Author

co-dax commented Sep 8, 2022

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!

@omridevk
Copy link
Owner

omridevk commented Sep 8, 2022

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants