1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-16 14:00:40 +00:00

Android: Hardware keyboard connection status callback

Adds a DisplayServer method to register hardware keyboard connection change callback.
This commit is contained in:
Anish Mishra
2025-04-04 16:16:24 +05:30
parent 8bd9cdeea6
commit b462db5adb
11 changed files with 51 additions and 10 deletions

View File

@@ -145,6 +145,16 @@ void DisplayServerAndroid::emit_system_theme_changed() {
}
}
void DisplayServerAndroid::set_hardware_keyboard_connection_change_callback(const Callable &p_callable) {
hardware_keyboard_connection_changed = p_callable;
}
void DisplayServerAndroid::emit_hardware_keyboard_connection_changed(bool p_connected) {
if (hardware_keyboard_connection_changed.is_valid()) {
hardware_keyboard_connection_changed.call_deferred(p_connected);
}
}
void DisplayServerAndroid::clipboard_set(const String &p_text) {
GodotJavaWrapper *godot_java = OS_Android::get_singleton()->get_godot_java();
ERR_FAIL_NULL(godot_java);