chromiumembedded / java-cef

Java Chromium Embedded Framework (JCEF). A simple framework for embedding Chromium-based browsers in other applications using the Java programming language.
https://bitbucket.org/chromiumembedded/java-cef
Other
655 stars 147 forks source link

onPreKeyEvent in keyboardHandler is never called #444

Open baltov opened 1 year ago

baltov commented 1 year ago

onPreKey event is never called when some key is pressed.

To Reproduce Steps to reproduce the behavior:

  1. define keyboardhandler, attach it to client
  2. log a message when onPreKeyEvent is called
  3. log is not printed

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 }

Expected behavior onPreKeyEvent event to be used