android: use the native system keyboard for menu text entry - #19346
Merged
Conversation
4 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This replaces #19126
my bad @Keropon , this was the only way I saw to still salvage the PR
Guidelines
C89_BUILD=1Description
Adds an option to use the native Android system keyboard (IME) for menu text entry instead of RetroArch's built-in on-screen keyboard, bringing Android to parity with iOS (which already swaps in the native keyboard via
ios_keyboard_start()).Why
The built-in OSK only ever receives hardware key events. On Android's
NativeActivitythere is no text field, so IME-committed text like clipboard paste, password-manager autofill, autocomplete, swipe, will never reach it. Pasting is therefore impossible in fields like the RetroAchievements login, menu Search, and cheat-code entry.How it works (mirrors the existing iOS path):
menu_input_dialog_start()/menu_input_dialog_start_search()call a newandroid_keyboard_start(), placed alongside the existing#ifdef HAVE_COCOATOUCHiOS hooks.RetroActivityCommonraises the soft keyboard through a hidden, focusableEditTextoverlay and forwards committed/pasted text back via a newonSystemKeyboardInput()JNI callback.android_keyboard_poll()(drained fromandroid_input_poll()), then fed into the existinginput_keyboard_line; The rest of the menu code is unchanged.Scope / notes:
-std=gnu89 -Wdeclaration-after-statement); no new warnings introduced by the added code.Related Issues
Related Pull Requests
None.
Reviewers
[Will update later]
Video Example
Tested on a Retroid Pocket Classic (Android 14)
screen-20260619-005333.mp4