Page 1 of 1

onPreKeyEvent is never called

PostPosted: Wed Mar 29, 2023 1:44 am
by stef5636
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

Re: onPreKeyEvent is never called

PostPosted: Sat Apr 01, 2023 3:11 pm
by stef5636
Still 3 days and nobody here? Are I am on right support forum?

Re: onPreKeyEvent is never called

PostPosted: Sun Apr 02, 2023 9:06 am
by ndesktop
I don't know JCEF, but do you implement also GetKeyboardHandler ?

Re: onPreKeyEvent is never called

PostPosted: Fri Apr 21, 2023 9:59 am
by stef5636
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.