projects/ng-keyboard-shortcuts/src/lib/ng-keyboard-shortcuts.component.ts
A component to bind global shortcuts, can be used multiple times across the app will remove registered shortcuts when element is removed from DOM.
OnInit
AfterViewInit
OnChanges
OnDestroy
selector | ng-keyboard-shortcuts |
Methods |
|
Inputs |
Accessors |
disabled | |
Disable all shortcuts for this component. |
shortcuts | |
Type : ShortcutInput[] | ShortcutInput
|
|
Default value : []
|
|
A list of shortcuts. |
Public select | ||||||
select(key: string)
|
||||||
Select a key to listen to, will emit when the selected key is pressed.
Parameters :
Returns :
Observable<ShortcutEventOutput>
|
disabled | ||||
setdisabled(value)
|
||||
Disable all shortcuts for this component.
Parameters :
Returns :
void
|