[solved] Empty XEvent in OnPreKeyEvent on Linux

Having problems with building or using CEF's C/C++ APIs? This forum is here to help. Please do not post bug reports or feature requests here.

[solved] Empty XEvent in OnPreKeyEvent on Linux

Postby olzzen » Fri Jun 18, 2021 1:21 am

We have updated CEF on linux from 3.2785.1485 to 91.1.19 and now we have a problem with keyevents.
The parameter os_event to KeyboardHandler::OnPreKeyEvent is always empty. We have added a minimal implementation to cefsimple and there's the same problem. We cannot build the cefclient example since we haven't the necessary gtk packages.

Code: Select all
bool SimpleHandler::OnPreKeyEvent(CefRefPtr<CefBrowser> browser, const CefKeyEvent &event, CefEventHandle os_event, bool *is_keyboard_shortcut)
{
    if (!os_event)
        printf("%s: No XEvent!\n", __PRETTY_FUNCTION__);
    return false;
}


This always prints "No XEvent!" for any pressed key. Any suggestions?
Last edited by olzzen on Fri Jun 18, 2021 11:02 am, edited 1 time in total.
olzzen
Techie
 
Posts: 27
Joined: Fri Oct 23, 2015 1:01 am

Re: Empty XEvent in OnPreKeyEvent on Linux

Postby magreenblatt » Fri Jun 18, 2021 9:40 am

Many events are synthetic now (coming from Aura, etc). You will need to use the CefKeyEvent argument.
magreenblatt
Site Admin
 
Posts: 10919
Joined: Fri May 29, 2009 6:57 pm

Re: Empty XEvent in OnPreKeyEvent on Linux

Postby olzzen » Fri Jun 18, 2021 11:01 am

Ok, i see. Thank you.
olzzen
Techie
 
Posts: 27
Joined: Fri Oct 23, 2015 1:01 am


Return to Support Forum

Who is online

Users browsing this forum: Google [Bot] and 22 guests