int (CefKeyEvent cefKeyEvent) { return switch (cefKeyEvent.type) { case KEYEVENT_RAWKEYDOWN, KEYEVENT_KEYDOWN -> KeyEvent.KEY_PRESSED; case KEYEVENT_KEYUP -> KeyEvent.KEY_RELEASED; case KEYEVENT_CHAR -> KeyEvent.KEY_TYPED; }; }