RemoteKeyboardSink

fun RemoteKeyboardSink(focusRequester: FocusRequester, handler: RemoteKeyHandler, modifier: Modifier = Modifier)(source)

Zero-size field that holds keyboard focus so both hardware keys and the soft keyboard reach a remote session.

It never holds what was typed. Each edit - a typed character, an IME commit, a soft-keyboard backspace, a paste - is read as input and reverted in the same transformation, so the field stays at SINK_SENTINEL with the caret at its end; the sentinel is there so a soft backspace has something to delete. Keys the session sends itself are taken in the preview pass, before the field could move its caret or edit with them.