useStartTyping

callback will be fired when you start typing on a non editable element

Demo

Usage

function useStartTyping(callback: (event: KeyboardEvent) => void): voiduseStartTyping(() => {
  if (const inputRef: Kaioken.MutableRefObject<HTMLInputElement | null>inputRef.current: HTMLInputElement | nullcurrent) {
    const inputRef: Kaioken.MutableRefObject<HTMLInputElement | null>inputRef.current: HTMLInputElementcurrent.HTMLOrSVGElement.focus(options?: FocusOptions): void
[MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLElement/focus)
focus
()
} })