Android: "Use System Keyboard" opt-in#19126
Conversation
|
Copy paste and speech to text should be helpful Google keyboards and replacements are not full keyboard replacements. But then again neither is the libretro onscreen keyboard, so that doesn't matter. I sometimes wish I could use it like in termux for text only dos, scummvm games and similar, but those cores have their own replacements even if they're inferior in usability, or assume a real keyboard. No reason to hold up a frontend keyboard because of a wish of being able to use it in cores that would probably look bad anyway with the keyboard replacing most of the screen of a game when in use. But of you have a idea for it I wouldn't say no... Speech to text if it could be made "minimal" could be pretty cool in games like the older text only adventures. |
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