onPreKeyEvent is never called

Having problems with building or using the JCEF Java binding? Ask your questions here.

onPreKeyEvent is never called

Postby stef5636 » Wed Mar 29, 2023 1:44 am

Trying to handle space button but onPreKeyEvent is never called. Testing on Mac and Linux. OffscreenRendering is false.
Any advice how to stop processing some buttons, space as example?
example for my keyboard handler:
....
client_ = cefApp_.createClient();
client_.addKeyboardHandler(keyboardHandler);
..........
@Override
public boolean onPreKeyEvent(CefBrowser browser, CefKeyEvent event, BoolRef is_keyboard_shortcut) {
log.info("OnPreKeyEvent: {}", event); /// Never called
return false
}

Thanks
stef5636
Newbie
 
Posts: 3
Joined: Wed Mar 29, 2023 1:36 am

Re: onPreKeyEvent is never called

Postby stef5636 » Sat Apr 01, 2023 3:11 pm

Still 3 days and nobody here? Are I am on right support forum?
stef5636
Newbie
 
Posts: 3
Joined: Wed Mar 29, 2023 1:36 am

Re: onPreKeyEvent is never called

Postby ndesktop » Sun Apr 02, 2023 9:06 am

I don't know JCEF, but do you implement also GetKeyboardHandler ?
ndesktop
Master
 
Posts: 750
Joined: Thu Dec 03, 2015 10:10 am

Re: onPreKeyEvent is never called

Postby stef5636 » Fri Apr 21, 2023 9:59 am

GetKeyboardHandler is function that should return implemented keyboardhandler. And yes, As in my code above I implemented it and onPreKey on this keyboard handler is never called.
stef5636
Newbie
 
Posts: 3
Joined: Wed Mar 29, 2023 1:36 am


Return to JCEF Forum

Who is online

Users browsing this forum: No registered users and 15 guests