diff --git a/tests/cefclient/browser/browser_window_osr_gtk.cc b/tests/cefclient/browser/browser_window_osr_gtk.cc index 5508c8bc8..67775ecf7 100644 --- a/tests/cefclient/browser/browser_window_osr_gtk.cc +++ b/tests/cefclient/browser/browser_window_osr_gtk.cc @@ -1382,12 +1382,11 @@ gint BrowserWindowOsrGtk::KeyEvent(GtkWidget* widget, if (event->type == GDK_KEY_PRESS) { key_event.type = KEYEVENT_RAWKEYDOWN; host->SendKeyEvent(key_event); - } else { - // Need to send both KEYUP and CHAR events. - key_event.type = KEYEVENT_KEYUP; - host->SendKeyEvent(key_event); key_event.type = KEYEVENT_CHAR; host->SendKeyEvent(key_event); + } else { + key_event.type = KEYEVENT_KEYUP; + host->SendKeyEvent(key_event); } return TRUE;