/** * Get a single, normalized string from the list of the `KeyboardEvent.key` properties. * * @param {Array} keys The list of the `KeyboardEvent.key` properties * @returns {string} */ export declare const normalizeKeys: (keys: string[]) => string; /** * Get the list of the `KeyboardEvent.key` properties from a single, normalized string. * * @param {string} normalizedKeys A single, normalized string that contains the list of the `KeyboardEvent.key` properties * @returns {Array} */ export declare const getKeysList: (normalizedKeys: string) => string[]; /** * Normalizes a keyboard event key value to a key before its modification. * * Keep in mind that there is difference between `key` and `code` properties of the KeyboardEvent object. * The `key` property represents the logical key on the keyboard (after applying modifiers and taking * the keyboard layout into account), where the `code` property represents the physical key * (regardless of what is printed on the key). Using the `keyCode` for alphanumeric keys, * solves the problem and allows to get the correct key value. The value that takes the keyboard layout * into account but is not modified by the modifiers (e.g. Alt + L would give polish "ł" we want "l"). * * @param {Event} event The KeyboardEvent object. * @returns {string} */ export declare const normalizeEventKey: ({ which, key }: { which: number; key: string; }) => string; export declare const MODIFIER_KEYS: string[]; /** * Check if a pressed key is a modifier key. * * @param {string} pressedKey A pressed key. * @returns {boolean} */ export declare const isModifierKey: (pressedKey: string) => boolean; /** * Get every pressed modifier key from the performed `KeyboardEvent`. * * @param {KeyboardEvent} event The event object. * @param {boolean} [mergeMetaKeys=false] If `true`, the function returns "control" and "meta" * modifiers keys as the "control/meta" name. This allows creating * keyboard shortcuts with modifier key that trigger the shortcut * actions depend on the OS keyboard layout (the Meta key for macOS * and Control for non macOS system). * @returns {string[]} */ export declare const getPressedModifierKeys: (event: KeyboardEvent, mergeMetaKeys?: boolean) => string[]; /** * Get all key combinations that a keyboard event can match against registered shortcuts. * Returns an array of key arrays: the literal form and -- when the OS-native modifier * is pressed (Meta on macOS, Control on other systems) -- the unified `control/meta` form. * This mirrors the matching logic used by the shortcut recorder. * * @param {KeyboardEvent} event The keyboard event. * @param {Function} platformCheck A function that returns `true` on macOS. * Defaults to `isMacOS` from `helpers/browser`. * @returns {Array} */ export declare const getEventKeyCombinations: (event: KeyboardEvent, platformCheck: (() => boolean) | undefined) => string[][];