import { EventTarget } from 'event-target-shim'; import { type CustomEventMap } from '@deephaven/utils'; import Shortcut, { type KeyState } from './Shortcut'; type EventMap = CustomEventMap<{ onUpdate: CustomEvent; }>; declare class ShortcutRegistry extends EventTarget { readonly shortcutMap: Map; readonly shortcutsByCategory: Map; /** * Creates a Shortcut and adds it to the registry * @param params The constructor params for the {@link Shortcut} * @returns The created shortcut or the shortcut in the registry if 1 already exists w/ the same ID */ createAndAdd(params: ConstructorParameters[0]): Shortcut; /** * Adds a shortcut to the registry. Warns and returns existing shortcut if a shortcut with the same ID already exists * @param shortcut Shortcut to add to the registry * @returns Shortcut passed if it is not in the registry. Shortcut from the registry if one exists for the same ID */ add(shortcut: Shortcut): Shortcut; /** * Gets a shortcut from the registry from an ID * @param id ID of the shortcut * @returns The shortcut for that ID if it exists */ get(id: string): Shortcut | undefined; /** * Gets an array of any registered shortcuts with conflicting key states. * Only checks the key states of the current OS (Mac or Windows/Linux) * @param keyState * @returns Array of conflicting shortcuts. Empty array if none conflict */ getConflictingShortcuts(keyState: KeyState): Shortcut[]; } declare const registry: Readonly; export default registry; //# sourceMappingURL=ShortcutRegistry.d.ts.map