diff options
author | estade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-12-12 22:06:47 +0000 |
---|---|---|
committer | estade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-12-12 22:06:47 +0000 |
commit | 6bea3284a8c15fc9a0e793d0da00423c2c2b885c (patch) | |
tree | 2f2b911969c81049d19622861e2c8a3c60ff518a | |
parent | cf0d278d5ad746f025a7cf687dcc019b4c09421e (diff) | |
download | chromium_src-6bea3284a8c15fc9a0e793d0da00423c2c2b885c.zip chromium_src-6bea3284a8c15fc9a0e793d0da00423c2c2b885c.tar.gz chromium_src-6bea3284a8c15fc9a0e793d0da00423c2c2b885c.tar.bz2 |
A couple of linux keyboard input fixes.
* Store text as wchar_t, so non-latin characters fit in it.
* Set text again after second round of editing key_code in event_sending_controller.cc
Review URL: http://codereview.chromium.org/13769
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@6936 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | webkit/glue/webinputevent.h | 4 | ||||
-rw-r--r-- | webkit/tools/test_shell/event_sending_controller.cc | 5 |
2 files changed, 7 insertions, 2 deletions
diff --git a/webkit/glue/webinputevent.h b/webkit/glue/webinputevent.h index c0a79de..e347cda 100644 --- a/webkit/glue/webinputevent.h +++ b/webkit/glue/webinputevent.h @@ -149,11 +149,11 @@ class WebKeyboardEvent : public WebInputEvent { bool system_key; // Set if we receive a SYSKEYDOWN/WM_SYSKEYUP message. MSG actual_message; // Set to the current keyboard message. #elif defined(OS_LINUX) - // The ASCII character, if available, corresponding to this key event. + // The unicode character, if available, corresponding to this key event. // TODO(evanm): temporary hack for test_shell. Ideally we'd either manage // to stuff everything into key_code, or make this field shared by all // implementations, but this will have to do for now. - char text; + wchar_t text; #endif WebKeyboardEvent() diff --git a/webkit/tools/test_shell/event_sending_controller.cc b/webkit/tools/test_shell/event_sending_controller.cc index b027c94..a603524 100644 --- a/webkit/tools/test_shell/event_sending_controller.cc +++ b/webkit/tools/test_shell/event_sending_controller.cc @@ -420,6 +420,11 @@ int EventSendingController::GetButtonNumberFromSingleArg( } } event_char.type = WebInputEvent::CHAR; +#if defined(OS_LINUX) + // |key_code| may have changed, so update |text|. + // (See deanm comment above.) + event_char.text = event_char.key_code; +#endif webview()->HandleInputEvent(&event_char); } |