UNPKG

757 BTypeScriptView Raw
1import { ReactNode } from "react";
2import { IHotkeyProps } from "./hotkey";
3import { IKeyCombo } from "./hotkeyParser";
4import { IHotkeysProps } from "./hotkeysTypes";
5export declare enum HotkeyScope {
6 LOCAL = "local",
7 GLOBAL = "global"
8}
9export interface IHotkeyAction {
10 combo: IKeyCombo;
11 props: IHotkeyProps;
12}
13export declare class HotkeysEvents {
14 private scope;
15 private actions;
16 constructor(scope: HotkeyScope);
17 count(): number;
18 clear(): void;
19 setHotkeys(props: IHotkeysProps & {
20 children?: ReactNode;
21 }): void;
22 handleKeyDown: (e: KeyboardEvent) => void;
23 handleKeyUp: (e: KeyboardEvent) => void;
24 private invokeNamedCallbackIfComboRecognized;
25 private isScope;
26 private isTextInput;
27}