lazy-widgets
Version:
Typescript retained mode GUI for the HTML canvas API
25 lines (24 loc) • 957 B
TypeScript
import { TextInputHandler, type TextInputHandlerListener } from './TextInputHandler.js';
/**
* The default implementation of {@link TextInputHandler}, for devices that have
* a virtual keyboard (such as mobile devices).
*
* Can also be used in a WebXR session if the browser supports it, however, this
* is not recommended, as some devices such as the Oculus Quest 2 will ignore
* the initial value of the text input and the text selection, which leads to a
* bad user experience.
*
* @category Core
*/
export declare class SystemTextInputHandler extends TextInputHandler {
private textInputElem;
private dismissTimeout;
constructor(listener: TextInputHandlerListener);
private handleInput;
private handleSelection;
private handleBlur;
private handleFocus;
askInput(currentText: string, selectStart: number, selectEnd: number): void;
select(selectStart: number, selectEnd: number): void;
dismiss(): void;
}