UNPKG

@area2-ai/a2-react-keystroke-package

Version:

This package enables secure and efficient collection of user keystroke data through hooks, designed for both desktop and mobile platforms. The collected data is processed by **area2** servers to generate a neuroprofile, which reflects key cognitive, behav

17 lines (16 loc) 958 B
import { ClipboardEvent, ChangeEvent } from "react"; import type { IKeystrokeResult } from "../interfaces"; /** * Keystroke for android mobile browser * @returns {Object} - An object containing the text input, input change handler, keydown handler, keyup handler, paste handler, before input handler, key input handler, and getNeuroprofile function. */ export declare const useMobileKeystrokeAndroid: () => { value: string; handleInputChange: (event: ChangeEvent<HTMLInputElement>) => void; handleKeydown: (target: HTMLInputElement) => Promise<void>; handleKeyup: () => void; handlePaste: (event: ClipboardEvent<HTMLInputElement>) => void; handleKeyInput: (inputContent: string) => void; handleOnBeforeInput: (currentValue: string) => void; getNeuroprofile: (userUID: string, userToken: string, action?: "default" | "compare" | "summary" | "trends" | undefined) => Promise<IKeystrokeResult | undefined>; };