@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
16 lines (15 loc) • 923 B
TypeScript
import { ClipboardEvent, ChangeEvent } from "react";
import type { IKeystrokeResult } from "../interfaces";
/**
* Keystroke for ios mobile browser
* @returns {Object} - An object containing the text input, input change handler, keydown handler, keyup handler, paste handler, before input handler, typing session status, and getNeuroprofile function.
*/
export declare const useMobileKeystrokeIOS: () => {
value: string;
handleInputChange: (event: ChangeEvent<HTMLInputElement>) => void;
handleKeydown: (keyPressed: string, target: HTMLInputElement) => void;
handleKeyup: (keyPressed: string) => void;
handlePaste: (event: ClipboardEvent<HTMLInputElement>) => void;
handleOnBeforeInput: (value: number) => void;
getNeuroprofile: (userUID: string, userToken: string, action?: "default" | "compare" | "summary" | "trends" | undefined) => Promise<IKeystrokeResult | undefined>;
};