From 173fb79550db948a552076bc4de7e3b666073484 Mon Sep 17 00:00:00 2001 From: Marshall Greenblatt Date: Thu, 9 Dec 2010 17:30:49 +0000 Subject: [PATCH] Fix text input of characters from east-asian languages (issue #152). git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@151 5089003a-bbd8-11dd-ad1f-f1f9622dbc98 --- libcef/webwidget_host_win.cc | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/libcef/webwidget_host_win.cc b/libcef/webwidget_host_win.cc index 4ae69ec0d..327cbca89 100644 --- a/libcef/webwidget_host_win.cc +++ b/libcef/webwidget_host_win.cc @@ -113,7 +113,6 @@ LRESULT CALLBACK WebWidgetHost::WndProc(HWND hwnd, UINT message, WPARAM wparam, host->CaptureLostEvent(); break; - // TODO(darin): add WM_SYSKEY{DOWN/UP} to capture ALT key actions case WM_KEYDOWN: case WM_KEYUP: case WM_SYSKEYDOWN: @@ -123,6 +122,12 @@ LRESULT CALLBACK WebWidgetHost::WndProc(HWND hwnd, UINT message, WPARAM wparam, host->KeyEvent(message, wparam, lparam); break; + // Necessary for text input of characters from east-asian languages. Do + // not pass to DefWindowProc or characters will be displayed twice. + case WM_IME_CHAR: + host->KeyEvent(message, wparam, lparam); + return 0; + case WM_SETFOCUS: host->SetFocus(true); break;