export declare const NUMERIC_KEYS: readonly ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"]; export type NumericKey = (typeof NUMERIC_KEYS)[number]; export declare const ALPHABETIC_KEYS: readonly ["A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z"]; export type AlphabeticKey = (typeof ALPHABETIC_KEYS)[number]; export declare const SYMBOL_KEYS: readonly ["Space", "!", "@", "#", "$", "%", "^", "&", "*", "(", ")", "-", "_", "=", "+", "[", "]", "{", "}", ";", ":", "'", "\"", ",", ".", "/", "?", "`", "~", "\\"]; export type SymbolKey = (typeof SYMBOL_KEYS)[number]; export declare const NAVIGATION_KEYS: readonly ["ArrowUp", "ArrowDown", "ArrowLeft", "ArrowRight", "Home", "End", "PageUp", "PageDown"]; export type NavigationKey = (typeof NAVIGATION_KEYS)[number]; export declare const EDITING_KEYS: readonly ["Backspace", "Delete", "Insert", "Enter", "Tab", "Escape"]; export type EditingKey = (typeof EDITING_KEYS)[number]; export declare const MODIFIER_KEYS: readonly ["Shift", "Control", "Alt", "Meta", "AltGraph", "CapsLock", "NumLock", "ScrollLock"]; export type ModifierKey = (typeof MODIFIER_KEYS)[number]; export declare const FUNCTION_KEYS: readonly ["F1", "F2", "F3", "F4", "F5", "F6", "F7", "F8", "F9", "F10", "F11", "F12", "FN"]; export type FunctionKey = (typeof FUNCTION_KEYS)[number]; export declare const NUMPAD_KEYS: readonly ["Numpad0", "Numpad1", "Numpad2", "Numpad3", "Numpad4", "Numpad5", "Numpad6", "Numpad7", "Numpad8", "Numpad9", "NumpadAdd", "NumpadSubtract", "NumpadMultiply", "NumpadDivide", "NumpadDecimal", "NumpadEnter"]; export type NumpadKey = (typeof NUMPAD_KEYS)[number]; export declare const MEDIA_KEYS: readonly ["AudioVolumeMute", "AudioVolumeDown", "AudioVolumeUp", "MediaTrackNext", "MediaTrackPrevious", "MediaStop", "MediaPlayPause"]; export type MediaKey = (typeof MEDIA_KEYS)[number]; export declare const MISC_KEYS: readonly ["PrintScreen", "Pause", "ContextMenu", "Clear", "Select", "Undo", "Redo", "Help"]; export type MiscKey = (typeof MISC_KEYS)[number]; export type KeyboardKey = NumericKey | AlphabeticKey | SymbolKey | NavigationKey | EditingKey | ModifierKey | FunctionKey | NumpadKey | MediaKey | MiscKey | "unknown"; /** * Special characters / symbols for macOS-specific keyboard keys. * Only contains special symbols, regular characters that are equivalent to their name are not included. */ export declare const MAC_KEY_SYMBOLS: Partial>; /** * Special characters / symbols for Windows-specific keyboard keys. * Only contains special symbols, regular characters that are equivalent to their name are not included. */ export declare const WINDOWS_KEY_SYMBOLS: Partial>; /** * Special characters / symbols for generic keyboard keys. * Only contains special symbols, regular characters that are equivalent to their name are not included. */ export declare const GENERIC_KEY_SYMBOLS: Partial>; export type ShortCutAllStep = { /** * Shortcut step that requires all keys to be pressed. * For example, Ctrl + S would be represented as `{ all: ["Control", "S"] }`. */ all: KeyboardKey[]; }; export type ShortCutAnyStep = { /** * Shortcut step that requires any one of the keys to be pressed. * For example, Ctrl or Command would be represented as `{ any: ["Control", "Meta"] }`. */ any: KeyboardKey[]; }; /** * A shortcut step can be either an `all` step or an `any` step. */ export type ShortcutStep = (ShortCutAllStep | ShortCutAnyStep) & {}; export declare const isAllStep: (step: ShortcutStep) => step is ShortCutAllStep; export declare const isAnyStep: (step: ShortcutStep) => step is ShortCutAnyStep; export declare const isAlphabeticKey: (key: string) => key is AlphabeticKey; export declare const isSymbolKey: (key: string) => key is SymbolKey; export declare const isNavigationKey: (key: string) => key is NavigationKey; export declare const isEditingKey: (key: string) => key is EditingKey; export declare const isModifierKey: (key: string) => key is ModifierKey; export declare const isFunctionalKey: (key: string) => key is FunctionKey; export declare const isNumpadKey: (key: string) => key is NumpadKey; export declare const isNumericKey: (key: string) => key is NumericKey; export declare const isMediaKey: (key: string) => key is MediaKey; export declare const isMiscKey: (key: string) => key is MiscKey; /** * Gets and maps the normalized keyboard key from a KeyboardEvent (e.g. emitted by a keyup or keydown event). */ export declare const keyboardEventToKey: (event: KeyboardEvent) => KeyboardKey;