import '../../../assert/js/assert.js';
import '../../../globals.js';
/**
 * A collection of fields that describes keys for a Hotkey. This includes a key that should be pressed to fire the
 * behavior, modifier keys that must be pressed in addition to the key, and ignored modifier keys that will not prevent
 * the hotkey from firing even if they are down.
 *
 * See the KeyDescriptorOptions for detailed information.
 *
 * @author Jesse Greenberg (PhET Interactive Simulations)
 */
import { EnglishKey, EnglishStringToCodeMap } from '../imports.js';
type ModifierKey = 'q' | 'w' | 'e' | 'r' | 't' | 'y' | 'u' | 'i' | 'o' | 'p' | 'a' | 's' | 'd' | 'f' | 'g' | 'h' | 'j' | 'k' | 'l' | 'z' | 'x' | 'c' | 'v' | 'b' | 'n' | 'm' | 'ctrl' | 'alt' | 'shift' | 'tab' | 'meta';
declare const IGNORE_DELIMITER = "?";
type IgnoreDelimiter = typeof IGNORE_DELIMITER;
type IgnoreModifierKey = `${ModifierKey}${IgnoreDelimiter}`;
type IgnoreOtherModifierKeys = `${IgnoreDelimiter}${ModifierKey}`;
type AllowedKeys = keyof typeof EnglishStringToCodeMap;
export type AllowedKeysString = `${AllowedKeys}`;
export type OneKeyStrokeEntry = `${AllowedKeys}` | `${IgnoreModifierKey}+${EnglishKey}` | `${IgnoreOtherModifierKeys}+${EnglishKey}`;
export type OneKeyStroke = `${AllowedKeys}` | // e.g. 't'
`${ModifierKey}+${AllowedKeys}` | // e.g. 'shift+t'
`${ModifierKey}+${ModifierKey}+${AllowedKeys}` | // e.g. 'ctrl+shift+t'
`${IgnoreModifierKey}+${AllowedKeys}` | // e.g. 'shift?+t' (shift added to ignoredModifierKeys)
`${IgnoreModifierKey}+${ModifierKey}+${AllowedKeys}` | // e.g. 'shift?+ctrl+t' (shift added to ignoredModifierKeys)
`${IgnoreOtherModifierKeys}+${AllowedKeys}` | // e.g. '?shift+t' (shift is a modifier key but ALL other default modifier keys are ignored)
`${IgnoreOtherModifierKeys}+${ModifierKey}+${AllowedKeys}`;
export type KeyDescriptorOptions = {
    key: AllowedKeysString;
    modifierKeys?: AllowedKeysString[];
    ignoredModifierKeys?: AllowedKeysString[];
};
export default class KeyDescriptor {
    readonly key: AllowedKeysString;
    readonly modifierKeys: AllowedKeysString[];
    readonly ignoredModifierKeys: AllowedKeysString[];
    constructor(providedOptions?: KeyDescriptorOptions);
    /**
     * Returns a string representation of the hotkey in the format of "natural" english. Modifier keys first, followed
     * by the final key. For example, if the key is 't' and the modifier keys are 'shift', the string would be 'shift+t'.
     */
    getHotkeyString(): OneKeyStroke[number];
    /**
     * Parses an input string to extract the main key and its associated modifier keys, while considering ignored
     * modifier keys based on the placement of the '?' delimiter.
     *
     * See KeyboardListener for a description of key and modifierKey behavior.
     *
     * The function handles the following cases:
     * 1. If a word is followed by '?', it is added to `ignoredModifierKeys`.
     * 2. If a word is preceded by '?', it indicates all other default modifier keys should be ignored,
     *    except the word itself, which is added to `modifierKeys`.
     *
     * keyStrokeToKeyDescriptor('r');
     * // Output: { key: 'r', modifierKeys: [], ignoredModifierKeys: [] }
     *
     * keyStrokeToKeyDescriptor('alt+r');
     * // Output: { key: 'r', modifierKeys: ['alt'], ignoredModifierKeys: [] }
     *
     * keyStrokeToKeyDescriptor('alt+j+r');
     * // Output: { key: 'r', modifierKeys: ['alt', 'j'], ignoredModifierKeys: [] }
     *
     * keyStrokeToKeyDescriptor('alt?+j+r');
     * // Output: { key: 'r', modifierKeys: ['j'], ignoredModifierKeys: ['alt'] }
     *
     * keyStrokeToKeyDescriptor('shift?+t');
     * // Output: { key: 't', modifierKeys: [], ignoredModifierKeys: ['shift'] }
     *
     * keyStrokeToKeyDescriptor('?shift+t');
     * // Output: { key: 't', modifierKeys: ['shift'], ignoredModifierKeys: ['alt', 'control', 'meta'] }
     *
     * keyStrokeToKeyDescriptor('?shift+t+j');
     * // Output: { key: 'j', modifierKeys: ['shift', 't'], ignoredModifierKeys: ['alt', 'control', 'meta'] }
     *
     */
    static keyStrokeToKeyDescriptor(keyStroke: OneKeyStroke): KeyDescriptor;
}
export {};
//# sourceMappingURL=KeyDescriptor.d.ts.map