Is there any way to call action keys, like backspaces, arrow keys, insert, etc. This is for windows 11 and macOS (intel)
This is the code for it currently this is in the CefBrowserOsr class in java
- Code: Select all
@Override
public void injectKeyTyped(int key, int mods) {
KeyEvent ev = new KeyEvent(dc_, KeyEvent.KEY_TYPED, 0, mods, 0, (char) key);
sendKeyEvent(ev);
here is the code for calling the native code.
- Code: Select all
/**
* Send a key event.
* @param e The event to send.
*/
protected final void sendKeyEvent(KeyEvent e) {
try {
N_SendKeyEvent(e);
} catch (UnsatisfiedLinkError ule) {
ule.printStackTrace();
}
}