import * as i0 from '@angular/core'; import { OnInit, OnDestroy, ElementRef } from '@angular/core'; import { ThyEventDispatcher } from '@tethys/cdk/event'; import { Observable } from 'rxjs'; /** * @name thyHotkey */ declare class ThyHotkeyDirective implements OnInit, OnDestroy { private document; private hotkeyDispatcher; private elementRef; /** * 热键对应 Code,多个热键组合支持通过数组或逗号分割的形式传入 */ readonly thyHotkey: i0.InputSignal; /** * 配置热键触发范围,默认绑定在 document 上 */ readonly thyHotkeyScope: i0.InputSignal>; /** * 热键触发后的事件 */ readonly thyHotkeyListener: i0.OutputEmitterRef; private subscription; ngOnInit(): void; ngOnDestroy(): void; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵdir: i0.ɵɵDirectiveDeclaration; } declare class ThyHotkeyModule { static ɵfac: i0.ɵɵFactoryDeclaration; static ɵmod: i0.ɵɵNgModuleDeclaration; static ɵinj: i0.ɵɵInjectorDeclaration; } declare function hotkey(event: KeyboardEvent): string; declare function isHotkey(event: KeyboardEvent, key: string): boolean; declare class ThyHotkeyDispatcher extends ThyEventDispatcher { eventName: string; private createKeydownObservable; /** * 热键事件订阅 */ keydown(hotkey: string | string[], scope?: ElementRef | Element | Document): Observable; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵprov: i0.ɵɵInjectableDeclaration; } export { ThyHotkeyDirective, ThyHotkeyDispatcher, ThyHotkeyModule, hotkey, isHotkey };