From b93b25b1303114cccdf708aeece197eff968e831 Mon Sep 17 00:00:00 2001 From: Michael SCHAL Date: Wed, 10 Dec 2025 19:49:10 +0100 Subject: [PATCH] v1.1.9: Fix input activation not showing keyboard on Android TV - Added SystemChannels.textInput.invokeMethod('TextInput.show') to force keyboard - Used addPostFrameCallback to ensure widget state is updated before focus request - Added support for gameButtonA and numpadEnter keys --- .../iptv/screens/mobile_playlist_screen.dart | 15 +++++++++++---- .../iptv/widgets/mobile_settings_tab.dart | 2 +- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/lib/mobile/features/iptv/screens/mobile_playlist_screen.dart b/lib/mobile/features/iptv/screens/mobile_playlist_screen.dart index e4ba775..dc23025 100644 --- a/lib/mobile/features/iptv/screens/mobile_playlist_screen.dart +++ b/lib/mobile/features/iptv/screens/mobile_playlist_screen.dart @@ -591,7 +591,11 @@ class _TVTextFieldState extends State<_TVTextField> { void _activateInput() { setState(() => _isEditing = true); - _inputFocus.requestFocus(); + // Wait for the widget to rebuild with canRequestFocus: true + WidgetsBinding.instance.addPostFrameCallback((_) { + _inputFocus.requestFocus(); + SystemChannels.textInput.invokeMethod('TextInput.show'); + }); } @override @@ -600,9 +604,12 @@ class _TVTextFieldState extends State<_TVTextField> { focusNode: _navFocus, onKeyEvent: (node, event) { if (event is KeyDownEvent) { - if (event.logicalKey == LogicalKeyboardKey.select || - event.logicalKey == LogicalKeyboardKey.enter || - event.logicalKey == LogicalKeyboardKey.space) { + final key = event.logicalKey; + if (key == LogicalKeyboardKey.select || + key == LogicalKeyboardKey.enter || + key == LogicalKeyboardKey.space || + key == LogicalKeyboardKey.gameButtonA || + key == LogicalKeyboardKey.numpadEnter) { _activateInput(); return KeyEventResult.handled; } diff --git a/lib/mobile/features/iptv/widgets/mobile_settings_tab.dart b/lib/mobile/features/iptv/widgets/mobile_settings_tab.dart index 19e7dc4..a9a26e4 100644 --- a/lib/mobile/features/iptv/widgets/mobile_settings_tab.dart +++ b/lib/mobile/features/iptv/widgets/mobile_settings_tab.dart @@ -108,7 +108,7 @@ class _MobileSettingsTabState extends ConsumerState { ), SizedBox(height: 4), Text( - 'Version 1.1.8', + 'Version 1.1.9', style: TextStyle( fontSize: 13, color: AppColors.textSecondary,