diff options
Diffstat (limited to 'webkit/tools/test_shell/mac')
-rw-r--r-- | webkit/tools/test_shell/mac/webwidget_host.mm | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/webkit/tools/test_shell/mac/webwidget_host.mm b/webkit/tools/test_shell/mac/webwidget_host.mm index 9447544..5be3a2a 100644 --- a/webkit/tools/test_shell/mac/webwidget_host.mm +++ b/webkit/tools/test_shell/mac/webwidget_host.mm @@ -255,7 +255,15 @@ void WebWidgetHost::WheelEvent(NSEvent *event) { } void WebWidgetHost::KeyEvent(NSEvent *event) { - webwidget_->handleInputEvent(WebInputEventFactory::keyboardEvent(event)); + WebKeyboardEvent keyboard_event(WebInputEventFactory::keyboardEvent(event)); + webwidget_->handleInputEvent(keyboard_event); + if ([event type] == NSKeyDown) { + // Send a Char event here to emulate the keyboard events. + // TODO(hbono): Bug 20852 <http://crbug.com/20852> implement the + // NSTextInput protocol and remove this code. + keyboard_event.type = WebInputEvent::Char; + webwidget_->handleInputEvent(keyboard_event); + } } void WebWidgetHost::SetFocus(bool enable) { |