I coded program using JCEF with Swing.
I want to detect any key pressing and show it in console.
So made a custom class implements CefKeyboardHandler and override onKeyEvent like it below.
- Code: Select all
public class KeyboardHandler implements CefKeyboardHandler {
@Override
public boolean onKeyEvent(CefBrowser browser, CefKeyEvent event) {
System.out.println("key pressed : " + event.character);
}
}
It can show key character in console EXCEPT tab key.
I assume web page don't throw tab key pressed event to JCEF properly.
How can I solve this?
Thank you