diff options
author | yusukes@google.com <yusukes@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-08-18 13:36:43 +0000 |
---|---|---|
committer | yusukes@google.com <yusukes@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-08-18 13:36:43 +0000 |
commit | c907cc61ae94982368a2394ea2e3f328a8d76e70 (patch) | |
tree | 9f70f8c8d390ebec43808ba75165a1882f18b45a /views | |
parent | 97156b7e600a7be478f20c764873577a1cb27d58 (diff) | |
download | chromium_src-c907cc61ae94982368a2394ea2e3f328a8d76e70.zip chromium_src-c907cc61ae94982368a2394ea2e3f328a8d76e70.tar.gz chromium_src-c907cc61ae94982368a2394ea2e3f328a8d76e70.tar.bz2 |
Add Unicode support to ibus_input_method.cc.
We should copy |character_| and |unmodified_| character values to the PengingKeyEvent object so that we can type Unicode characters (>= 0x80) even when ibus-daemon is running.
BUG=None (internal bug)
TEST=manually done: login, switch to the French virtual keyboard, press Shift, press More, then press √, ÷, etc.
Review URL: http://codereview.chromium.org/7599022
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@97303 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'views')
-rw-r--r-- | views/ime/input_method_ibus.cc | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/views/ime/input_method_ibus.cc b/views/ime/input_method_ibus.cc index f2893bf..bb49440 100644 --- a/views/ime/input_method_ibus.cc +++ b/views/ime/input_method_ibus.cc @@ -196,6 +196,8 @@ class InputMethodIBus::PendingKeyEvent { ui::EventType type_; int flags_; ui::KeyboardCode key_code_; + uint16 character_; + uint16 unmodified_character_; guint32 ibus_keyval_; @@ -215,6 +217,8 @@ InputMethodIBus::PendingKeyEvent::PendingKeyEvent(InputMethodIBus* input_method, type_(key.type()), flags_(key.flags()), key_code_(key.key_code()), + character_(key.GetCharacter()), + unmodified_character_(key.GetUnmodifiedCharacter()), ibus_keyval_(ibus_keyval) { DCHECK(input_method_); @@ -244,6 +248,10 @@ void InputMethodIBus::PendingKeyEvent::ProcessPostIME(bool handled) { } #endif KeyEvent key(type_, key_code_, flags_); + if (key_code_ == ui::VKEY_UNKNOWN) { + key.set_character(character_); + key.set_unmodified_character(unmodified_character_); + } input_method_->ProcessKeyEventPostIME(key, ibus_keyval_, handled); } |