UNPKG

@launchmenu/core

Version:

An environment for visual keyboard controlled applets

26 lines 1.45 kB
import { IIOContext } from "../../../../context/_types/IIOContext"; import { IKeyEventListener } from "../../../../keyHandler/_types/IKeyEventListener"; import { ITextField } from "../../../_types/ITextField"; import { TextEditCommand } from "../../commands/TextEditCommand"; import { ITextEditTarget } from "../../_types/ITextEditTarget"; /** * Creates an advanced text field key handler, which can be used for complete editors * @param textField The text field to create the handler for * @param context The context that the handler is used in * @param config Extra configuration * @returns The key handler that can be added to the input handler stack */ export declare function createAdvancedTextFieldKeyHandler(textField: ITextField, context: IIOContext, { multiline, onExit, createExtraHandler, indentCharacter, }?: { /** Whether this is a multiline input, defaults to true */ multiline?: boolean; /** The code to execute when trying to exit the field */ onExit?: () => void; /** Optional extra key handlers to augment this handler by */ createExtraHandler?: (data: { undoableTextField: ITextEditTarget; onEditCommand: (command: TextEditCommand) => void; }) => IKeyEventListener; /** The character to use for indentation, defaults to 4 spaces */ indentCharacter?: string; }): IKeyEventListener; //# sourceMappingURL=createAdvancedTextFieldKeyHandler.d.ts.map