import type { HotkeyEventName } from '@scalar/oas-utils/entities/hotkeys'; import type { HotKeyConfig, HotKeyModifiers } from '@scalar/oas-utils/entities/workspace'; import type { EventBus } from '../libs/index.js'; export type HotKeyEvent = Partial>; /** * Default set of keybindings * * Passing an empty object for hotkeys will disable them * * TODO we can add a merge or overwrite option * * The modifier can be set by the user but defaults to ctrl for windows/linux and meta for macos * * For the modifier key: * - if you leave it blank it can be true or false * - if you explicitly set it, the event must match ex: modifier false will not trigger if the modifier was pressed */ export declare const DEFAULT_HOTKEYS: HotKeyConfig; /** Checks if we are in an "input" */ export declare const isInput: (ev: KeyboardEvent) => boolean; /** Converts our modifier config to the eventKey */ export declare const getModifiers: (modifiers: HotKeyModifiers) => ("altKey" | "ctrlKey" | "shiftKey" | "metaKey")[]; /** * Global keydown handler for hotkeys * * This is the brain of the operation, we turn keybindings -> events */ export declare const handleHotKeyDown: (ev: KeyboardEvent, eventBus: EventBus, { hotKeys, modifiers }?: { hotKeys?: Partial> | undefined; modifiers?: ("default" | "Meta" | "Control" | "Shift" | "Alt")[] | undefined; }) => void; //# sourceMappingURL=hot-keys.d.ts.map