`CefWindowDelegate::OnKeyEvent` is not triggered
Opened this issue · 0 comments
Describe the bug
While investigating the failure of ViewsWindowTest.WindowAccelerator
, I noticed that the OnKeyEvent function is not triggered. This happens because CefWindowDelegate::OnKeyEvent
is not being called as expected.
To Reproduce
I haven't tested on Linux or Windows, but I expect the issue to be reproducible there as well.
It does work on Windows using CefUnhandledKeyEventHandler
:
cef/libcef/browser/views/window_impl.cc
Line 59 in a231b7e
Steps to reproduce the issue:
- Run the
ViewsWindowTest.WindowAccelerator
unit test:
./out/Debug_GN_arm64/ceftests.app/Contents/MacOS/ceftests --use-views --enable-chrome-runtime --gtest_filter=ViewsWindowTest.WindowAccelerator
- Observe that
OnKeyEvent
is never called.
Alternatively, you can:
- Run
cefclient
and set a breakpoint atViewsWindow::OnKeyEvent
:
cef/tests/cefclient/browser/views_window.cc
Line 908 in a231b7e
- Press any key.
- Notice that
OnKeyEvent
is not called.
Expected behavior
CefWindowDelegate::OnKeyEvent
should be triggered whenever a key is pressed:
cef/include/views/cef_window_delegate.h
Lines 229 to 235 in a231b7e
Versions (please complete the following information):
- OS: macOS 14.7
- CEF Version: 129, 130