Virtual keyboard on Android not issuing TextEntered events
Prerequisite Checklist
- I searched for existing issues to prevent duplicates
- I searched for existing discussions on the forum to prevent duplicates
- I am here to report an issue and not to just ask a question or look for help (use the forum or Discord instead)
Describe your issue here
Virtual keyboard on Android is not issuing TextEntered events, especially* for non latin character input. *depends on device
Your Environment
- OS / distro / window manager: Device 1: Redmi Note 10S MIUI Global 14.0.3 Android 13 TP1A.20624.014
Device 2: Samsung Galaxy M53 One UI 6.0 Android 14
- SFML version:
3.0.0 git hash: 5cf740fd93443e739eef277e67f87696ce94b0c8 (desktop)
3.0.0 git hash: c1f92ed02008b94cfffb32e368f036c1117d7bbb (android)- Compiler / toolchain:
- Special compiler / CMake flags:
export ANDROID_NDK_ROOT=/home/wins/Android/android-ndk-r25c/
cmake .. -DCMAKE_TOOLCHAIN_FILE="${ANDROID_NDK_ROOT}/build/cmake/android.toolchain.cmake" -DANDROID_ABI=arm64-v8a -DANDROID_PLATFORM=28 -DSECP256K1_ENABLE_MODULE_RECOVERY=ONSteps to reproduce
set virtual keyboard visible(true), then for each event:
void TextInput::OnSFMLEvent(sf::Event const& _ev)
{
if (_ev.type == sf::Event::KeyReleased)
{
*** handle Enter / Backspace ***
}
else if (_ev.type == sf::Event::TextEntered)
{
*** handle unicode ***
}
}Expected behavior
Sfml should issue TextEntered event on virtual keyboard key press. and it should come with character unicode. (so not only latin chars, but any layout from other languages)
Actual behavior
On Desktop ubuntu version the code works, but there is no virtual keyboard. On Device1: the keyboard is summoned. but only the letters from top raw can be pressed and it returns only one TextEntered event, after that it does not work. On any layout.
On Device2: it is much better. the kyboard works on latin layout no problem. But when pressed on any non latin chars (different layouts) only KeyReleased event comes. no TextEntered event.
Source: SFML/SFML