import '../../../assert/js/assert.js';
import '../../../tandem/js/PhetioIDUtils.js';
import '../../../globals.js';
import { Hotkey, HotkeyFireOnHoldTiming, Node, OneKeyStroke, PDOMPointer, SceneryEvent, TInputListener } from '../imports.js';
import TReadOnlyProperty from '../../../axon/js/TReadOnlyProperty.js';
import EnabledComponent, { EnabledComponentOptions } from '../../../axon/js/EnabledComponent.js';
import TProperty from '../../../axon/js/TProperty.js';
type KeyboardListenerSelfOptions<Keys extends readonly OneKeyStroke[]> = {
    keys?: Keys | null;
    keyStringProperties?: TReadOnlyProperty<OneKeyStroke>[] | null;
    fire?: (event: KeyboardEvent | null, keysPressed: Keys[number], listener: KeyboardListener<Keys>) => void;
    press?: (event: KeyboardEvent | null, keysPressed: Keys[number], listener: KeyboardListener<Keys>) => void;
    release?: (event: KeyboardEvent | null, keysPressed: Keys[number] | null, listener: KeyboardListener<Keys>) => void;
    focus?: (listener: KeyboardListener<Keys>) => void;
    blur?: (listener: KeyboardListener<Keys>) => void;
    fireOnDown?: boolean;
    fireOnHold?: boolean;
    fireOnHoldTiming?: HotkeyFireOnHoldTiming;
    fireOnHoldCustomDelay?: number;
    fireOnHoldCustomInterval?: number;
    allowOverlap?: boolean;
    override?: boolean;
};
export type KeyboardListenerOptions<Keys extends readonly OneKeyStroke[]> = KeyboardListenerSelfOptions<Keys> & EnabledComponentOptions;
declare class KeyboardListener<Keys extends readonly OneKeyStroke[]> extends EnabledComponent implements TInputListener {
    private readonly _fire;
    private readonly _press;
    private readonly _release;
    private readonly _focus;
    private readonly _blur;
    readonly fireOnDown: boolean;
    readonly fireOnHold: boolean;
    readonly fireOnHoldTiming: HotkeyFireOnHoldTiming;
    readonly fireOnHoldCustomDelay: number;
    readonly fireOnHoldCustomInterval: number;
    readonly allowOverlap: boolean;
    private readonly override;
    readonly hotkeys: Hotkey[];
    readonly isPressedProperty: TReadOnlyProperty<boolean>;
    readonly pressedKeyStringPropertiesProperty: TProperty<TReadOnlyProperty<OneKeyStroke>[]>;
    interrupted: boolean;
    private readonly enabledPropertyListener;
    constructor(providedOptions: KeyboardListenerOptions<Keys>);
    /**
     * Whether this listener is currently activated with a press.
     */
    get isPressed(): boolean;
    /**
     * Fired when the enabledProperty changes
     */
    private onEnabledPropertyChange;
    /**
     * Dispose of this listener by disposing of any Callback timers. Then clear all KeyGroups.
     */
    dispose(): void;
    /**
     * Everything that uses a KeyboardListener should prevent more global scenery keyboard behavior, such as pan/zoom
     * from arrow keys.
     */
    keydown(event: SceneryEvent<KeyboardEvent>): void;
    /**
     * Public because this is called with the scenery listener API. Do not call this directly.
     */
    focusout(event: SceneryEvent): void;
    /**
     * Public because this is called through the scenery listener API. Do not call this directly.
     */
    focusin(event: SceneryEvent): void;
    /**
     * Part of the scenery listener API. On cancel, clear active KeyGroups and stop their behavior.
     */
    cancel(): void;
    /**
     * Part of the scenery listener API. Clear active KeyGroups and stop their callbacks.
     */
    interrupt(): void;
    /**
     * Work to be done on both cancel and interrupt.
     */
    private handleInterrupt;
    protected createSyntheticEvent(pointer: PDOMPointer): SceneryEvent<KeyboardEvent>;
    /**
     * Converts the provided keys for this listener into a collection of Hotkeys to easily track what keys are down.
     */
    private createHotkeys;
    /**
     * Adds a global KeyboardListener to a target Node. This listener will fire regardless of where focus is in
     * the document. The listener is returned so that it can be disposed.
     */
    static createGlobal(target: Node, providedOptions: KeyboardListenerOptions<OneKeyStroke[]>): KeyboardListener<OneKeyStroke[]>;
}
export default KeyboardListener;
//# sourceMappingURL=KeyboardListener.d.ts.map