Index: ui/events/event.cc |
diff --git a/ui/events/event.cc b/ui/events/event.cc |
index fc87ca68350777906afd6c130b322858bb938f8d..0b406531afef906b5e483494381b95c7200706d4 100644 |
--- a/ui/events/event.cc |
+++ b/ui/events/event.cc |
@@ -749,6 +749,14 @@ void KeyEvent::SetExtendedKeyEventData(scoped_ptr<ExtendedKeyEventData> data) { |
} |
void KeyEvent::ApplyLayout() const { |
+ // If the client has set the character (e.g. faked key events from virtual |
+ // keyboard), it's client's responsibility to set the dom key correctly. |
+ // Otherwise, set the dom key as unidentified. |
+ // Please refer to crbug.com/443889. |
+ if (character_ != 0) { |
+ key_ = DomKey::UNIDENTIFIED; |
Shu Chen
2014/12/19 08:29:21
Not sure whether it's more appropriate to set as D
kpschoedel
2014/12/19 16:08:51
UNIDENTIFIED is fine for this CL, as it is defined
|
+ return; |
+ } |
#if defined(OS_WIN) |
// Native Windows character events always have is_char_ == true, |
// so this is a synthetic or native keystroke event. |