export interface HotkeyCallbackConfig {
    callback: HotkeyCallback;
    modifiers: string[];
    action: string;
    seq?: string;
    level?: number;
    combo?: string;
}
export type Disposable = () => void;
export type HotkeyCallback = (e: KeyboardEvent, combo?: string) => any | false;
export interface HotkeyCallbacks {
    [key: string]: HotkeyCallbackConfig[];
}
export interface ApiHotkey {
    /**
     * 获取当前快捷键配置
     *
     * @experimental
     * @since v1.1.0
     */
    get callbacks(): HotkeyCallbacks;
    /**
     * 绑定快捷键
     * bind hotkey/hotkeys,
     * @param combos 快捷键，格式如：['command + s'] 、['ctrl + shift + s'] 等
     * @param callback 回调函数
     * @param action
     */
    bind(combos: string[] | string, callback: HotkeyCallback, action?: string): Disposable;
}
export interface HotkeyConfig {
    combos: string | string[];
    callback: HotkeyCallback;
    action?: string;
}
export declare class Hotkey {
    readonly viewName: string;
    logger: {
        log: (message?: any, ...optionalParams: any[]) => void;
        error: (message?: any, ...optionalParams: any[]) => void;
        warn: (message?: any, ...optionalParams: any[]) => void;
    };
    /**
     * 当前快捷键配置
     */
    callBacks: HotkeyCallbacks;
    private directMap;
    private sequenceLevels;
    private resetTimer;
    private ignoreNextKeyup;
    private ignoreNextKeypress;
    private nextExpectedAction;
    private isActivate;
    constructor(viewName?: string);
    activate(activate: boolean): void;
    mount(window: Window): () => void;
    /**
     * 绑定快捷键
     * @param combos 快捷键，格式如：['command + s'] 、['ctrl + shift + s'] 等
     * @param callback 回调函数
     * @param action
     */
    bind(combos: string[] | string, callback: HotkeyCallback, action?: string): Hotkey;
    batchBind(hotkeys: HotkeyConfig[]): Hotkey;
    /**
     * 解绑快捷键
     * @param combos 快捷键，格式如：['command + s'] 、['ctrl + shift + s'] 等
     * @param callback 回调函数
     * @param action
     */
    unbind(combos: string[] | string, callback: HotkeyCallback, action?: string): void;
    /**
     * resets all sequence counters except for the ones passed in
     */
    private resetSequences;
    /**
     * finds all callbacks that match based on the keycode, modifiers,
     * and action
     */
    private getMatches;
    private handleKey;
    private handleKeyEvent;
    private resetSequenceTimer;
    private bindSequence;
    private bindSingle;
    private bindMultiple;
}
