UNPKG

@launchmenu/core

Version:

An environment for visual keyboard controlled applets

19 lines 1.17 kB
import { IMenu } from "../../_types/IMenu"; import { IMenuItemExecuteCallback } from "../../_types/IMenuItemExecuteCallback"; import { IDisposableKeyEventListener } from "../../../../textFields/interaction/_types/IDisposableKeyEventListener"; /** * Creates a standard menu key handler * @param menu The menu to create the handler for * @param config Any additional optional data for the key handler configuration * @returns The key handler that can be added to the UILayer */ export declare function createStandardMenuKeyHandler(menu: IMenu, { onExit, onExecute, useItemKeyHandlers, useContextItemKeyHandlers, }?: { /** The code to execute when trying to exit the menu */ onExit?: () => void; onExecute?: IMenuItemExecuteCallback; /** Whether to forward events to item key handlers (can be slow for menus with many items), defaults to true*/ useItemKeyHandlers?: boolean; /** Whether to forward key events to context menu items (can be costly for large selections or context menus), defaults to true */ useContextItemKeyHandlers?: boolean; }): IDisposableKeyEventListener; //# sourceMappingURL=createMenuKeyHandler.d.ts.map