@@ -63,6 +63,7 @@ GodotIOJavaWrapper::GodotIOJavaWrapper(JNIEnv *p_env, jobject p_godot_io_instanc
6363 _get_unique_id = p_env->GetMethodID (cls, " getUniqueID" , " ()Ljava/lang/String;" );
6464 _show_keyboard = p_env->GetMethodID (cls, " showKeyboard" , " (Ljava/lang/String;IIII)V" );
6565 _hide_keyboard = p_env->GetMethodID (cls, " hideKeyboard" , " ()V" );
66+ _has_hardware_keyboard = p_env->GetMethodID (cls, " hasHardwareKeyboard" , " ()Z" );
6667 _set_screen_orientation = p_env->GetMethodID (cls, " setScreenOrientation" , " (I)V" );
6768 _get_screen_orientation = p_env->GetMethodID (cls, " getScreenOrientation" , " ()I" );
6869 _get_system_dir = p_env->GetMethodID (cls, " getSystemDir" , " (IZ)Ljava/lang/String;" );
@@ -220,6 +221,16 @@ bool GodotIOJavaWrapper::has_vk() {
220221 return (_show_keyboard != nullptr ) && (_hide_keyboard != nullptr );
221222}
222223
224+ bool GodotIOJavaWrapper::has_hardware_keyboard () {
225+ if (_has_hardware_keyboard) {
226+ JNIEnv *env = get_jni_env ();
227+ ERR_FAIL_NULL_V (env, false );
228+ return env->CallBooleanMethod (godot_io_instance, _has_hardware_keyboard);
229+ } else {
230+ return false ;
231+ }
232+ }
233+
223234void GodotIOJavaWrapper::show_vk (const String &p_existing, int p_type, int p_max_input_length, int p_cursor_start, int p_cursor_end) {
224235 if (_show_keyboard) {
225236 JNIEnv *env = get_jni_env ();
0 commit comments