<div class='type'>Function</div>


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


<h2 id="capturefocus">captureFocus</h2>

<div class='sourceset sourceset-common'>Common</div>


```kotlin
fun FocusRequesterModifierNode.captureFocus(): Boolean
```


Deny requests to clear focus.

Use this function to send a request to capture focus. If a component captures focus, it will send
a `FocusState` object to its associated `onFocusChanged` modifiers where
`FocusState.isCaptured`() == true.

When a component is in a Captured state, all focus requests from other components are declined.

#### Returns

| | |
| --- | --- |
|  | true if the focus was successfully captured by one of the `focus` modifiers associated with this `FocusRequester`. False otherwise. |