Repository navigation
Description
The software keyboard arrow key navigation is still broken on Chromecast with Google TV devices, making text input impossible without external workarounds.
Environment:
Flutter version: 3.27.1 (also affects 3.24+)
Device: Chromecast with Google TV (4K and HD models)
Android version: Android TV 12
Input method: On-screen software keyboard
Steps to Reproduce:
Create a simple Flutter app with a TextField
Deploy to Chromecast with Google TV via adb
Navigate to the TextField using D-pad (arrow keys)
Software keyboard appears automatically
Try to use arrow keys to navigate letters on the keyboard
Expected: Arrow keys should move between keyboard letters
Actual: Arrow keys do nothing; keyboard is unresponsive
Current Workaround (NOT a solution):
The only way to make the keyboard work is to perform a hot restart:
Run the app: flutter run
Focus any TextField → keyboard shows but arrows don't work
Perform hot restart (r in terminal)
After full restart completes, keyboard arrows suddenly work
If the keyboard closes (pressing Back), the bug returns and requires another restart
Root Cause Analysis:
Based on investigation in the Flutter engine source code, the issue appears to be in InputConnectionAdaptor.java:
The InputConnectionAdaptor class intercepts arrow key events (onKeyDown/onKeyUp) and handles them in Flutter instead of returning false to let the event propagate to the Android InputMethod (software keyboard).
Theory:
When hot restart occurs, something in the lifecycle resets the input connection state, allowing the InputMethod to properly receive key events. This suggests the Flutter activity or input connection is incorrectly maintaining focus/event capture over the on-screen keyboard.
Attempted Fixes (all failed):
- ❌ Removing all Flutter shortcuts/actions from TextField
- ❌ Setting skipTraversal: false on Focus widgets
- ❌ Returning KeyEventResult.ignored for all arrow keys
- ❌ Programmatically hiding/showing keyboard via SystemChannels.textInput
- ❌ Using FocusNode listeners to detect keyboard state
- ❌ Checking AppLifecycleState changes
None of these Flutter-level solutions work because the problem is in the native Android layer (engine).
Impact:
This makes TextField input completely unusable on Chromecast devices, which represent a significant portion of Android TV users. Users cannot:
Enter email addresses for login
Type search queries
Fill forms
Enter any text input
Related Issues:
#154924 (originally reported, closed as duplicate)
[Add other related issue numbers if found]
Minimum Reproducible Example:
import 'package:flutter/material.dart';
void main() => runApp(const MyApp());
class MyApp extends StatelessWidget {
const MyApp({Key? key}) : super(key: key);
@override
Widget build(BuildContext context) {
return MaterialApp(
home: Scaffold(
body: Center(
child: Container(
width: 300,
child: TextField(
decoration: InputDecoration(
labelText: 'Test Input',
border: OutlineInputBorder(),
),
),
),
),
),
);
}
}
Run on Chromecast:
adb connect <chromecast-ip>:5555
flutter run -d <device-id>
Expected Behavior:
Arrow keys should navigate the on-screen keyboard letters, allowing text input via remote control (standard Android TV behavior).
Actual Behavior:
Arrow keys are captured by Flutter and do nothing. The keyboard is unresponsive until a hot restart is performed.
Request:
Please investigate the InputConnectionAdaptor implementation to ensure key events are properly propagated to the Android InputMethod when a software keyboard is active on Android TV devices.
Possible Solutions:
Check InputConnection.isKeyboardActive() before handling arrow keys in Flutter
Return false from onKeyDown/onKeyUp when an InputMethod is consuming events
Add Android TV specific handling that defers to the system keyboard
Provide a flag/configuration to disable Flutter's key event interception for TextFields on TV platforms
Additional Context:
This issue specifically affects Android TV devices with software keyboards (Chromecast) but does NOT affect:
Android TV devices with physical keyboards
Android phones/tablets (touch keyboards work fine)
The hot restart workaround proves this is a state/lifecycle issue, not a fundamental incompatibility.
Activity
huycozy commentedon Oct 23, 2025
From triage pov: I unfortunately can't reproduce this issue as I don't have such device on my end.
However, per #154924 (comment), this issue seems to be valid until now, as it had no bandwidth to solve at that time. Keeping this issue to have team's input.
romaingyh commentedon Oct 30, 2025
Hello @georgehoss, as you mentioned the issue I opened last year for this bug so here is what I learned about this :
alanmartinsdeazevedo commentedon Jul 18, 2026
Confirmed on a physical Google TV device, with evidence that this is a Flutter-side issue, not platform behavior.
In #154924 the conclusion was that Android TV is moving away from D-pad navigation of the soft keyboard, since native apps appeared to behave the same. We tested this on a physical Google TV (Smart TV) and found otherwise:
Experiment (same device, same IME, same app):
TextField: the soft keyboard (Gboard TV) opens, but D-pad arrows never reach it — they move the caret inside the field instead. Typing is impossible. (The reported bug.)EditTextembedded via a platform view (Flutter draws everything else): the same Gboard TV keyboard is fully D-pad navigable — arrows move across the keys, letters can be selected,IME_ACTION_DONEworks, including withTYPE_TEXT_VARIATION_PASSWORD.The only difference between the two cases is whether the IME is talking to Flutter's text input (
InputConnectionAdaptor) or to a real platformEditText. So the IME does still support D-pad key navigation, but only engages it when the focused editor is a platform text input. This points at theInputConnection/EditorInfoFlutter provides rather than at the arrow key events themselves — consistent with the earlier finding in #154924 that makinghandleKeyEventreturnfalsedidn't help.Workaround for anyone blocked by this: embed a minimal
EditTextas aPlatformViewfor TV text entry. One caveat: never re-setinputTypeon updates — each re-assignment triggersrestartInput()and Gboard TV resets its highlighted key after every keystroke.Happy to share the minimal platform-view implementation or test patches on the device.
TV: Debrify keyboard — in-app DPAD keyboard so typing works on every TV
fix(tv): restore the native Android IME for single-line text input
fix(tv): restore the native Android IME for single-line text input
feat: TV search field is a native EditText platform view
fix(tv): keep the IME bound on Chromecast by reporting a text editor …
Android: Report FlutterView as a text editor while a text input clien…
Android: Report FlutterView as a text editor while a text input clien…
Android: Report FlutterView as a text editor while a text input clien…
Android: Report FlutterView as a text editor while a text input clien…