1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-05 12:10:55 +00:00

Add physical_scancode (keyboard layout independent keycodes) to InputEventKey and InputMap.

Fix non-latin keyboard layout keycodes on Linux/X11 (fallback to physical keycodes).
This commit is contained in:
bruvzg
2021-03-07 17:16:42 +02:00
parent 63391f645c
commit dab4cf3ed6
28 changed files with 458 additions and 35 deletions

View File

@@ -376,11 +376,11 @@ JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_joyconnectionchanged(
}
}
JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_key(JNIEnv *env, jclass clazz, jint p_scancode, jint p_unicode_char, jboolean p_pressed) {
JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_key(JNIEnv *env, jclass clazz, jint p_keycode, jint p_scancode, jint p_unicode_char, jboolean p_pressed) {
if (step == 0)
return;
os_android->process_key_event(p_scancode, p_unicode_char, p_pressed);
os_android->process_key_event(p_keycode, p_scancode, p_unicode_char, p_pressed);
}
JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_accelerometer(JNIEnv *env, jclass clazz, jfloat x, jfloat y, jfloat z) {