diff options
author | Erik Kundiman <erik@megapahit.org> | 2024-01-29 17:42:38 +0800 |
---|---|---|
committer | Erik Kundiman <erik@megapahit.org> | 2024-01-30 12:06:48 +0800 |
commit | aaa8cb5a37a720ff67792d0a31fec793b03b3742 (patch) | |
tree | 734ce89b2f133f1fd55cd04e5e79eb5c1ed06d50 /indra/llwindow/llwindowsdl.cpp | |
parent | 4c97df0ab1b450d5680975e18e894b6676a589ee (diff) |
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.
Diffstat (limited to 'indra/llwindow/llwindowsdl.cpp')
-rw-r--r-- | indra/llwindow/llwindowsdl.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
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: |