From b7cf7256aca73e90353c03871fc0e2c0537bb944 Mon Sep 17 00:00:00 2001 From: caspar Date: Thu, 8 Oct 2026 00:37:43 -0400 Subject: [PATCH] Restore real InputConnection to fix barcode scanner input Returning null from onCreateInputConnection() prevented the Chromium renderer from relaying hardware key events into HTML inputs, breaking scanner input on the Urovo CT58C. Return the real InputConnection from super and rely on the multi-layer keyboard suppression (JS inputmode, InputMethodManager, EditorInfo flags, manifest flags) which is already proven to work on this device. Co-Authored-By: Claude Opus 4.6 --- CLAUDE.md | 10 ++- .../joykoo/scanner/NoSoftKeyboardWebView.kt | 61 +++++++------------ 2 files changed, 30 insertions(+), 41 deletions(-) diff --git a/CLAUDE.md b/CLAUDE.md index 2a7c5de..58c5512 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -6,7 +6,15 @@ Native Android app (Kotlin) that wraps `https://smart.joykoo.mx/` in a fullscree ## Critical Design Decision -The Android soft keyboard must NEVER appear. The custom `NoSoftKeyboardWebView` returns `null` from `onCreateInputConnection()` to prevent the IME from ever being invoked, while hardware key events from the scanner still flow through the standard View key-event dispatch chain. Do not revert this or add an InputConnection — it is the core of the app. +The Android soft keyboard must NEVER appear. Keyboard suppression uses multiple layers — do not remove any of them: + +1. `NoSoftKeyboardWebView.onCheckIsTextEditor()` → `false` +2. `EditorInfo` flags `IME_FLAG_NO_EXTRACT_UI | IME_FLAG_NO_FULLSCREEN` in `onCreateInputConnection()` +3. `InputMethodManager.hideSoftInputFromWindow()` posted after each InputConnection request and on page load / window focus +4. JavaScript injection setting `inputmode="none"` on all ``, `