androidx.compose.ui.input.key
onInterceptKeyBeforeSoftKeyboard
Function · from org.jetbrains.compose.ui:ui:1.12.2
No hand-written docs yet.
Adding this modifier``Modifier to the modifier``Modifier parameter of a component will allow it to intercept hardware key events before they are sent to the software keyboard. This can be used to intercept key input from a DPad, or physical keyboard connected to the device and is not applicable to input that is sent to the soft keyboard via spell check or autocomplete.
Parameters
fun Modifier.onInterceptKeyBeforeSoftKeyboard(onInterceptKeyBeforeSoftKeyboard: (KeyEvent) -> Boolean): Modifier
onInterceptKeyBeforeSoftKeyboard: (KeyEvent) -> BooleanRequired
onInterceptKeyBeforeSoftKeyboard: (KeyEvent) -> BooleanRequiredThis callback is invoked when the user interacts with the hardware keyboard. While implementing this callback, return true to stop propagation of this event. If you return false, the key event will be sent to this SoftKeyboardInterceptionModifierNode's parent, and ultimately to the software keyboard.
Library docs
Adding this modifier``Modifier to the modifier``Modifier parameter of a component will allow
it to intercept hardware key events before they are sent to the software keyboard. This can be
used to intercept key input from a DPad, or physical keyboard connected to the device and is not
applicable to input that is sent to the soft keyboard via spell check or autocomplete.