| Index: mojo/services/public/cpp/input_events/lib/input_events_type_converters.cc
|
| diff --git a/mojo/services/public/cpp/input_events/lib/input_events_type_converters.cc b/mojo/services/public/cpp/input_events/lib/input_events_type_converters.cc
|
| index cff22d45f3d342ba704be09816f4c3985f7346f9..a5292d3080a65e227efc918181cefe5e76a57a80 100644
|
| --- a/mojo/services/public/cpp/input_events/lib/input_events_type_converters.cc
|
| +++ b/mojo/services/public/cpp/input_events/lib/input_events_type_converters.cc
|
| @@ -141,14 +141,21 @@ TypeConverter<EventPtr, scoped_ptr<ui::Event> >::ConvertTo(
|
| ui::EventType ui_event_type =
|
| TypeConverter<EventType, ui::EventType>::ConvertTo(input->action);
|
| switch (input->action) {
|
| - case EVENT_TYPE_KEY_PRESSED:
|
| - case EVENT_TYPE_KEY_RELEASED:
|
| - ui_event.reset(new ui::KeyEvent(
|
| - ui_event_type,
|
| - static_cast<ui::KeyboardCode>(
|
| - input->key_data->key_code),
|
| - ui::EventFlags(input->flags),
|
| - input->key_data->is_char));
|
| + case ui::ET_KEY_PRESSED:
|
| + case ui::ET_KEY_RELEASED:
|
| + if (input->key_data->is_char) {
|
| + ui_event.reset(new ui::KeyEvent(
|
| + static_cast<base::char16>(input->key_data->key_code),
|
| + static_cast<ui::KeyboardCode>(
|
| + input->key_data->key_code),
|
| + input->flags));
|
| + } else {
|
| + ui_event.reset(new ui::KeyEvent(
|
| + ui_event_type,
|
| + static_cast<ui::KeyboardCode>(
|
| + input->key_data->key_code),
|
| + input->flags));
|
| + }
|
| break;
|
| case EVENT_TYPE_MOUSE_PRESSED:
|
| case EVENT_TYPE_MOUSE_DRAGGED:
|
|
|