UNPKG

@uiwwsw/virtual-keyboard

Version:

**A revolutionary virtual keyboard solution for React that solves the Korean `composition` issue.**

31 lines (30 loc) 1.15 kB
import type { KeyBounds } from "./useKeypadLayout"; import type { VirtualInputHandle } from "../components/Input"; type ActivePress = { pointerId: number; value: string; type?: string; repeatTimeout?: number; keyIndex: number; }; type VirtualInputContextType = { inputRef: React.RefObject<VirtualInputHandle | null>; toggleShift: () => void; toggleKorean: () => void; shift: boolean; }; export declare function useKeypadInteraction({ inputRef, toggleShift, toggleKorean, shift, getTransformedValue, keyBoundsRef }: VirtualInputContextType & { getTransformedValue: (cell: { label?: string; value: string; type?: string; }) => string; keyBoundsRef: React.MutableRefObject<KeyBounds[]>; }): { activePresses: import("react").RefObject<Map<number, ActivePress>>; handlePointerDown: (e: React.PointerEvent<HTMLCanvasElement>) => void; handlePointerMove: (e: React.PointerEvent<HTMLCanvasElement>) => void; handlePointerUp: (e: React.PointerEvent<HTMLCanvasElement>) => void; handlePointerCancel: (e: React.PointerEvent<HTMLCanvasElement>) => void; }; export {};