Add the help panel key into the shortcut list displayed into the help panel
zannkukai opened this issue · comments
Is your feature request related to a problem? Please describe.
When we use the component KeyboardShortcutsHelpComponent
, we need to defined an key
to open the help panel.
This key isn't added into the shortcut list.
Describe the solution you'd like
This key shortcut should be added to the help panel.
Ideally the label associated by the key should be set as component input.
<ng-keyboard-shortcuts-help
[key]="'?'" [keyLabel]="'open the panel'"
[closeKey]="'escape'" [closeKeyLabel]="'close the panel'">
</ng-keyboard-shortcuts-help>
@zannkukai
Thank you for reporting the issue.
As I do believe this a bug, but I don't want to break the old API, so I am going to add a boolean Input to the ng-keyboard-shortcuts-help
component to allow the users to decide whether to add the key to the list or not. I will leave the default value as false for the next couple of versions, and will add some deprecation comments so in the next versions I will be able to make it the default behavior.
Thank you very much for reporting the issue
I will try to fix it as soon as possible.
Fixed in #75
Let me know if the issue persist.
Updated the readme file with the new Inputs you need to pass to the help component in order for the key to show up in the menu.
Please let me know if this implementation does not fit your needs.
Any feedback will be helpful.
You can install the latest https://www.npmjs.com/package/ng-keyboard-shortcuts/v/10.1.5
Ah I think I may have forgotten to add input for closingKeyLabel and description.
I will do so right now.
Done, added option to add to both toggle and close key a description and a label. see new docs for more info :)