From 8b3cc7eb152f08a43309ac89c799219917b1af21 Mon Sep 17 00:00:00 2001 From: Kurt Himebauch <136133082+xXJSONDeruloXx@users.noreply.github.com> Date: Thu, 3 Dec 2026 09:54:26 -0500 Subject: [PATCH] Wire XR keyboard text into the session input queue (#3631) Initialize KeyboardHost with the updated key and text callbacks. Keep XR physical-key routing and use the regular ordered compositor queue for text. --- .../java/com/droiddeck/launcher/SessionActivity.kt | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/app/src/main/java/com/droiddeck/launcher/SessionActivity.kt b/app/src/main/java/com/droiddeck/launcher/SessionActivity.kt index 3f11e0b979..2c8f179349 100644 --- a/app/src/main/java/com/droiddeck/launcher/SessionActivity.kt +++ b/app/src/main/java/com/droiddeck/launcher/SessionActivity.kt @@ -1605,10 +1605,14 @@ class SessionActivity : ComponentActivity(), SurfaceHolder.Callback, com.droidde /** The VR keyboard's keys go straight to the game, past the menu and pad handling a real key passes through. */ private val xrKeys by lazy { - com.droiddeck.launcher.input.KeyboardHost(this) { event -> - CompositorHost.isStarted && (event.action != KeyEvent.ACTION_DOWN || event.repeatCount == 0) && - com.droiddeck.launcher.input.GuestKeys.send(event) { code, pressed -> sendGuestKey(code, pressed, 16) } - } + KeyboardHost( + this, + sendKeyEvent = { event -> + CompositorHost.isStarted && (event.action != KeyEvent.ACTION_DOWN || event.repeatCount == 0) && + com.droiddeck.launcher.input.GuestKeys.send(event) { code, pressed -> sendGuestKey(code, pressed, 16) } + }, + sendText = { text -> if (CompositorHost.isStarted) WaylandCompositor.textInputCommit(text) }, + ) } @androidx.compose.runtime.Composable