UNPKG

898 BTypeScriptView Raw
1/**
2 * @fileoverview This component is DEPRECATED, and the code is frozen.
3 * All changes & bugfixes should be made to HotkeysDialog2 instead.
4 */
5import { ReactNode } from "react";
6import { HotkeyProps, HotkeysProps } from "../components/hotkeys";
7import { KeyCombo } from "../components/hotkeys/hotkeyParser";
8export declare enum HotkeyScope {
9 LOCAL = "local",
10 GLOBAL = "global"
11}
12export interface IHotkeyAction {
13 combo: KeyCombo;
14 props: HotkeyProps;
15}
16export 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}