/**
 * Represents a single hotkey (keyboard shortcut) that can be either:
 *
 * 1. Added to globalHotkeyRegistry (to be available regardless of keyboard focus)
 * 2. Added to a node's inputListeners (to be available only when that node is part of the focused trail)
 *
 * For example:
 *
 *    globalHotkeyRegistry.add( new Hotkey( {
 *      keyStringProperty: new Property( 'y' ),
 *      fire: () => console.log( 'fire: y' )
 *    } ) );
 *
 *    myNode.addInputListener( {
 *      hotkeys: [
 *        new Hotkey( {
 *          keyStringProperty: new Property( 'x' ),
 *          fire: () => console.log( 'fire: x' )
 *        } )
 *      ]
 *    } );
 *
 * Also supports modifier keys that must be pressed in addition to the Key. See options for a description of how
 * they behave.
 *
 * Hotkeys are managed by hotkeyManager, which determines which hotkeys are active based on the globalHotkeyRegistry
 * and what Node has focus. See that class for information about how hotkeys work.
 *
 * @author Jesse Greenberg (PhET Interactive Simulations)
 * @author Jonathan Olson <jonathan.olson@colorado.edu>
 */
import '../../../globals.js';
import EnabledComponent, { EnabledComponentOptions } from '../../../axon/js/EnabledComponent.js';
import TProperty from '../../../axon/js/TProperty.js';
import TReadOnlyProperty from '../../../axon/js/TReadOnlyProperty.js';
import type { AllowedKeysString, OneKeyStroke } from '../input/KeyDescriptor.js';
import KeyDescriptor from '../input/KeyDescriptor.js';
export type HotkeyFireOnHoldTiming = 'browser' | 'custom';
export type OverlapBehavior = 'prevent' | 'allow' | 'handle';
type SelfOptions = {
    keyStringProperty: TReadOnlyProperty<OneKeyStroke>;
    fire?: (event: KeyboardEvent | null) => void;
    press?: (event: KeyboardEvent | null) => void;
    release?: (event: KeyboardEvent | null) => void;
    fireOnDown?: boolean;
    fireOnHold?: boolean;
    fireOnHoldTiming?: HotkeyFireOnHoldTiming;
    fireOnHoldCustomDelay?: number;
    fireOnHoldCustomInterval?: number;
    overlapBehavior?: OverlapBehavior;
};
export type HotkeyOptions = SelfOptions & EnabledComponentOptions;
export default class Hotkey extends EnabledComponent {
    readonly keyStringProperty: TReadOnlyProperty<OneKeyStroke>;
    readonly fire: (event: KeyboardEvent | null) => void;
    readonly press: (event: KeyboardEvent | null) => void;
    readonly release: (event: KeyboardEvent | null) => void;
    readonly fireOnDown: boolean;
    readonly fireOnHold: boolean;
    readonly fireOnHoldTiming: HotkeyFireOnHoldTiming;
    readonly overlapBehavior: OverlapBehavior;
    readonly keyDescriptorProperty: TReadOnlyProperty<KeyDescriptor>;
    keysProperty: TReadOnlyProperty<AllowedKeysString[]>;
    readonly isPressedProperty: TProperty<boolean>;
    interrupted: boolean;
    private fireOnHoldTimer?;
    constructor(providedOptions: HotkeyOptions);
    /**
     * On "press" of a Hotkey. All keys are pressed while the Hotkey is active. May also fire depending on
     * events. See hotkeyManager.
     *
     * (scenery-internal)
     */
    onPress(event: KeyboardEvent | null, shouldFire: boolean): void;
    /**
     * On "release" of a Hotkey. All keys are released while the Hotkey is inactive. May also fire depending on
     * events. See hotkeyManager.
     */
    onRelease(event: KeyboardEvent | null, interrupted: boolean, shouldFire: boolean): void;
    /**
     * Manually interrupt this hotkey, releasing it and setting a flag so that it will not fire until the next time
     * keys are pressed.
     */
    interrupt(): void;
    dispose(): void;
}
export {};
//# sourceMappingURL=Hotkey.d.ts.map