angular2-hotkeys
Version:
Angular 16 and Ivy Compatible. Older versions might work but isn't officially tested.
25 lines (24 loc) • 995 B
TypeScript
import { Hotkey } from './hotkey.model';
import { Subject } from 'rxjs';
import { IHotkeyOptions } from './hotkey.options';
import { MousetrapInstance } from 'mousetrap';
import * as i0 from "@angular/core";
export declare class HotkeysService {
private options;
hotkeys: Hotkey[];
pausedHotkeys: Hotkey[];
mousetrap: MousetrapInstance;
cheatSheetToggle: Subject<any>;
private preventIn;
constructor(options: IHotkeyOptions);
private initCheatSheet;
add(hotkey: Hotkey | Hotkey[], specificEvent?: string): Hotkey | Hotkey[];
remove(hotkey?: Hotkey | Hotkey[], specificEvent?: string): Hotkey | Hotkey[];
get(combo?: string | string[]): Hotkey | Hotkey[];
pause(hotkey?: Hotkey | Hotkey[]): Hotkey | Hotkey[];
unpause(hotkey?: Hotkey | Hotkey[]): Hotkey | Hotkey[];
reset(): void;
private findHotkey;
static ɵfac: i0.ɵɵFactoryDeclaration<HotkeysService, never>;
static ɵprov: i0.ɵɵInjectableDeclaration<HotkeysService>;
}