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