export interface Shortcut { keys: string[][]; callback: (event: KeyboardEvent, keys?: string[]) => boolean | void; group?: string; runOnlyIf?: (event?: KeyboardEvent) => boolean; captureCtrl?: boolean; preventDefault?: boolean; stopPropagation?: boolean; relativeToGroup?: string; position?: 'before' | 'after'; forwardToContext?: Context; } export interface Context { __kindOf: symbol; scope: string; addShortcut(shortcut: Shortcut): void; addShortcuts(shortcuts: Shortcut[], options?: Partial): void; getShortcuts(keys: string[]): Shortcut[]; hasShortcut(keys: string[]): boolean; removeShortcutsByKeys(keys: string[]): void; removeShortcutsByGroup(group: string): void; } /** * Checks if the provided object is a context object. * * @param {*} objectToCheck An object to check. * @returns {boolean} */ export declare function isContextObject(objectToCheck: unknown): objectToCheck is Context; /** * The `ShortcutContext` API lets you store and manage [keyboard shortcuts](@/guides/navigation/keyboard-shortcuts/keyboard-shortcuts.md) in a given [context](@/guides/navigation/keyboard-shortcuts/keyboard-shortcuts.md#keyboard-shortcut-contexts). * * Each `ShortcutContext` object stores and manages its own set of keyboard shortcuts. * * @alias ShortcutContext * @class ShortcutContext * @param {string} name The name of the keyboard shortcut context * @param {string} [scope='table'] The scope of the shortcut: `'table'` or `'global'` * @returns {object} */ export declare const createContext: (name: string, scope?: string) => Context;