Mac: Fix OnKeyEvent() notification (issue #366).
git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@303 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
This commit is contained in:
parent
6b134b4def
commit
96f73aadc3
|
@ -244,6 +244,7 @@ void WebWidgetHost::WheelEvent(NSEvent *event) {
|
|||
|
||||
void WebWidgetHost::KeyEvent(NSEvent *event) {
|
||||
WebKeyboardEvent keyboard_event(WebInputEventFactory::keyboardEvent(event));
|
||||
last_key_event_ = keyboard_event;
|
||||
webwidget_->handleInputEvent(keyboard_event);
|
||||
if ([event type] == NSKeyDown &&
|
||||
!([event modifierFlags] & NSNumericPadKeyMask)) {
|
||||
|
@ -252,6 +253,7 @@ void WebWidgetHost::KeyEvent(NSEvent *event) {
|
|||
// TODO(hbono): Bug 20852 <http://crbug.com/20852> implement the
|
||||
// NSTextInput protocol and remove this code.
|
||||
keyboard_event.type = WebInputEvent::Char;
|
||||
last_key_event_ = keyboard_event;
|
||||
webwidget_->handleInputEvent(keyboard_event);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue