- Code: Select all
KeyEvent ev2 = new KeyEvent(canvas_, KeyEvent.KEY_TYPED, 0, 0, 0, '\r');
sendKeyEvent(ev2);
I've also tried the other newline character:
- Code: Select all
KeyEvent ev2 = new KeyEvent(canvas_, KeyEvent.KEY_TYPED, 0, 0, 0, '\n');
sendKeyEvent(ev2);
I've also tried with KEY_PRESSED instead of KEY_TYPED, which works for keys like tab and arrows:
- Code: Select all
KeyEvent ev2 = new KeyEvent(canvas_, KeyEvent.KEY_PRESSED, 0, 0, KeyEvent.VK_ENTER, '\n');
sendKeyEvent(ev2);
Nothing seems to work. BTW, I'm on a Mac. And the snippets above are inside a class that extends CefBrowser_N, so the sendKeyEvent function above belongs to CefBrowser_N.
Can anyone help me out? Could this be a bug with CEF or JCEF? I would really appreciate it. I'm SO CLOSE to having a beautiful embedded browser experience inside my 3d game.