import { System } from '../../../system';
import { IOElement } from '../../IOElement';
import { Listenable } from '../../Listenable';
import { Listener } from '../../Listener';
export declare function sameSetArray(a: string[], b: string[]): boolean;
export declare function isSupportedKeyboardEvent(event: KeyboardEvent): boolean;
export type Shortcut = {
    combo: string | string[];
    multiple?: boolean;
    strict?: boolean;
    keydown?: (key: string, event: IOKeyboardEvent) => boolean | void;
    keyup?: (key: string, event: IOKeyboardEvent) => boolean | void;
    preventDefault?: boolean;
    stopPropagation?: boolean;
};
export declare class KeyboardController {
    private _ctrl;
    private _meta;
    private _shift;
    private _alt;
    private _repeat;
    private _pressed;
    private _shortcuts;
    $element: IOElement;
    $system: System;
    constructor($system: System, $element: IOElement);
    private _listen;
    private _unlisten;
    private _reset;
    private _lowerCaseAlpha;
    private _onFocusIn;
    private _onFocusOut;
    isCtrlPressed(): boolean;
    isAltPressed(): boolean;
    isShiftPressed(): boolean;
    addShortcutGroup(shortcutGroup: Shortcut[]): string;
    removeShortcutGroup(id: string): void;
    isKeyPressed(key: string): boolean;
    private _flush;
    private _filterShortcuts;
    private _remove;
    private _keydown;
    private _keyup;
    private _isSystemCombo;
    private _onKeydown;
    getCurrentCombo(): string[];
    private _onKeyup;
}
export declare function makeShortcutListener(shortcuts: Shortcut[], _global?: boolean): Listener;
export declare function listenShortcut(component: Listenable, shortcuts: Shortcut[], _global?: boolean): () => void;
export interface IOKeyboardEvent {
    key: string;
    ctrlKey: boolean;
    shiftKey: boolean;
    altKey: boolean;
    metaKey: boolean;
    repeat: boolean;
}
export declare function listenKeydown(component: Listenable, onKeydown: (event: IOKeyboardEvent, _event: KeyboardEvent) => void): () => void;
export declare function listenKeypress(component: Listenable, onKeydown: (event: IOKeyboardEvent, _event: KeyboardEvent) => void): () => void;
export declare function makeKeydownListener(listener: (data: IOKeyboardEvent, _event: KeyboardEvent) => void): Listener;
export declare function makeKeypressListener(listener: (data: IOKeyboardEvent, _event: KeyboardEvent) => void): Listener;
export declare function listenKeyup(component: Listenable, onKeyup: (event: IOKeyboardEvent, _event: KeyboardEvent) => void): () => void;
export declare function makeKeyupListener(listener: (data: IOKeyboardEvent, _event: KeyboardEvent) => void): Listener;
export declare function isKeyPressed(system: System, key: string): boolean;
export declare function isKeyRepeat($system: System): boolean;
export declare function isShiftPressed($system: System): boolean;
export declare function isAltPressed($system: System): boolean;
export declare const keyToIcon: {
    Enter: string;
    Shift: string;
    Backspace: string;
    ArrowDown: string;
    ArrowLeft: string;
    ArrowRight: string;
    ArrowUp: string;
    AltLeft: string;
    AltRight: string;
    CtrlRight: string;
    CtrlLeft: string;
    MetaLeft: string;
};
