magreenblatt wrote:dreijer wrote:Follow-up question:
The documentation for CefKeyboardHandler::OnKeyEvent says that "Return true if the keyboard event was handled or false otherwise". What does that mean? What will happen if I handle the event as opposed to not?
If you return false the key event will be forwarded to the platform for whatever purpose the platform desires (shortcut key handling, etc). See CefBrowserHostImpl::PlatformHandleKeyboardEvent() for the operating systems that you're interested in.
Alright, thanks.
Is there any way to get a focus changed event when a field actually gets focused in the browser? The problem I'm having is how the flow of input works in the GUI framework I'm using:
1. App generates input event
2. I inject the input in to CEF
3. I need to know at this point whether it's safe for me to let the event propagate to other controls in the application.
With CefKeyboardHandler::OnKeyEvent, I won't know whether the event went to a focused field or not until my input event handler has completed and I know longer have a way of letting the original event propagate. However, if CEF had already told me that a field was focused, then I could've done the right thing.