<div class='type'>Compose Modifier</div>

<a id='references'></a>


<h2 id="handwritinghandler">handwritingHandler</h2>

<div class='sourceset sourceset-android'>Android</div>


```kotlin
fun Modifier.handwritingHandler(): Modifier
```


Configures an element to act as a stylus handwriting handler which can handle text input from a
handwriting session which was triggered by stylus handwriting on a handwriting detector.

When this element gains focus, if there is an ongoing stylus handwriting delegation which was
triggered by stylus handwriting on a handwriting detector, this element will receive text input
from the handwriting session via its input connection.

A common use case is a component which looks like a text input field but does not actually
support text input itself, and clicking on this fake text input field causes a real text input
field to be shown. To support handwriting initiation in this case, a `handwritingDetector`
modifier can be applied to the fake text input field to configure it as a detector, and this
modifier can be applied to the real text input field. The `callback` implementation for the fake
text field's `handwritingDetector` modifier is typically the same as the `onClick` implementation
its `clickable` modifier, which shows and focuses the real text input field.

This function returns a no-op modifier on API levels below Android U (34) as stylus handwriting
is not supported.