@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
15 lines (14 loc) • 745 B
TypeScript
import { ChangeEvent } from "react";
import type { IKeystrokeResult } from "../interfaces";
/**
* Keystroke for desktop browsers
* @returns {Object} - An object containing the text input, input change handler, keydown handler, keyup handler, typing session status, and getNeuroprofile function.
*/
export declare const useKeystroke: () => {
value: string;
handleInputChange: (event: ChangeEvent<HTMLInputElement>) => void;
handleKeydown: (key: string) => void;
handleKeyup: (key: string) => void;
getIsTypingSessionActive: () => boolean;
getNeuroprofile: (userUID: string, userToken: string, action?: "default" | "compare" | "summary" | "trends" | undefined) => Promise<IKeystrokeResult | undefined>;
};