From aaa8cb5a37a720ff67792d0a31fec793b03b3742 Mon Sep 17 00:00:00 2001 From: Erik Kundiman Date: Mon, 29 Jan 2024 17:42:38 +0800 Subject: First attempt to fix unicode input It should work well enough with most, but on Japanese (I assume all CJK), for now the composition part is still left printed out along with the result (as opposed to just replaced by the result). It's to be fixed next. --- indra/llwindow/llwindowsdl.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'indra/llwindow/llwindowsdl.cpp') diff --git a/indra/llwindow/llwindowsdl.cpp b/indra/llwindow/llwindowsdl.cpp index 106109ceff..bbc966fb25 100644 --- a/indra/llwindow/llwindowsdl.cpp +++ b/indra/llwindow/llwindowsdl.cpp @@ -1893,9 +1893,11 @@ void LLWindowSDL::gatherInput() break; case SDL_TEXTINPUT: - mKeyVirtualKey = *event.text.text; - handleUnicodeUTF16(mKeyVirtualKey, - gKeyboard->currentMask(FALSE)); + mCallbacks->handleUnicodeString(event.text.text); + break; + + case SDL_TEXTEDITING: + mCallbacks->handleUnicodeString(event.edit.text); break; case SDL_KEYUP: -- cgit v1.2.3