/** * Allows host shortcuts to function in your application by forwarding keyboard shortcuts to the host. * * @module */ /** * Data passed to the overridable shortcut handler. */ export type OverridableShortcutHandlerData = { /** * The matched shortcut that triggered the handler. * This is a canonical form of the shortcut, e.g. "ctrl+shift+x". */ matchedShortcut: string; }; /** * A handler must return `true` when it wants to **consume** the shortcut * (i.e. prevent forwarding to host). Any other return value forwards it. */ export type OverridableShortcutHandler = (event: KeyboardEvent, data: OverridableShortcutHandlerData) => boolean; /** * Replace the current overridable-shortcut handler. * * • Pass `undefined` to remove an existing handler. * • Returns the previous handler so callers can restore it if needed. * */ export declare function setOverridableShortcutHandler(handler: OverridableShortcutHandler | undefined): OverridableShortcutHandler | undefined; /** * Reset the state of the shortcut relay capability. * This is useful for tests to ensure a clean state. * */ export declare function resetIsShortcutRelayCapabilityEnabled(): void; /** * Enable capability to support host shortcuts. * */ export declare function enableShortcutRelayCapability(): Promise; /** * Checks if shortcutRelay capability is supported by the host * @returns boolean to represent whether the shortcutRelay capability is supported * * @throws Error if {@link app.initialize} has not successfully completed * */ export declare function isSupported(): boolean; /** * Allow apps to define zones where shortcuts should not be forwarded to the host. * This is useful for input fields for password where shortcuts should not trigger host actions. * */ export declare const DISABLE_SHORTCUT_FORWARDING_ATTRIBUTE = "data-disable-shortcuts-forwarding";