angular2-hotkeys
Version:
Angular 16 and Ivy Compatible. Older versions might work but isn't officially tested.
20 lines (19 loc) • 883 B
TypeScript
import { ElementRef, OnDestroy, OnInit } from '@angular/core';
import { ExtendedKeyboardEvent } from './hotkey.model';
import { HotkeysService } from './hotkeys.service';
import * as i0 from "@angular/core";
export declare class HotkeysDirective implements OnInit, OnDestroy {
private hotkeysService;
private elementRef;
hotkeys: {
[combo: string]: (event: KeyboardEvent, combo: string) => ExtendedKeyboardEvent;
}[];
private mousetrap;
private hotkeysList;
private oldHotkeys;
constructor(hotkeysService: HotkeysService, elementRef: ElementRef);
ngOnInit(): void;
ngOnDestroy(): void;
static ɵfac: i0.ɵɵFactoryDeclaration<HotkeysDirective, never>;
static ɵdir: i0.ɵɵDirectiveDeclaration<HotkeysDirective, "[hotkeys]", never, { "hotkeys": { "alias": "hotkeys"; "required": false; }; }, {}, never, never, false, never>;
}