UNPKG

@launchmenu/core

Version:

An environment for visual keyboard controlled applets

19 lines 1.12 kB
import { ITextField } from "../../_types/ITextField"; import { IKeyEventListener } from "../../../keyHandler/_types/IKeyEventListener"; import { IIOContext } from "../../../context/_types/IIOContext"; import { TextEditCommand } from "../commands/TextEditCommand"; /** * Creates a standard text field key handler * @param textField The text field to create the handler for * @param context The context that the handler is used in * @returns The key handler that can be added to the input handler stack */ export declare function createStandardTextFieldKeyHandler(textField: ITextField, context: IIOContext, { onExit, extraHandler, onEditCommand, }?: { /** The code to execute when trying to exit the field */ onExit?: () => void; /** Optional extra key handlers to augment this handler by */ extraHandler?: IKeyEventListener; /** The callback to make when an undoable action was retrieved, note that this command won't be executed by itself */ onEditCommand?: (command: TextEditCommand) => void; }): IKeyEventListener; //# sourceMappingURL=createTextFieldKeyHandler.d.ts.map