mirror of
https://github.com/godotengine/godot.git
synced 2025-11-01 06:01:14 +00:00
Cleanup and unify keyboard input.
- Unify keycode values (secondary label printed on a key), remove unused hardcoded Latin-1 codes. - Unify IME behaviour, add inline composition string display on Windows and X11. - Add key_label (localized label printed on a key) value to the key events, and allow mapping actions to the unshifted Unicode events. - Add support for physical keyboard (Bluetooth or Sidecar) handling on iOS. - Add support for media key handling on macOS. Co-authored-by: Raul Santos <raulsntos@gmail.com>
This commit is contained in:
parent
9937915ad7
commit
daad4aed62
61 changed files with 4464 additions and 3655 deletions
|
|
@ -382,11 +382,11 @@ JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_joyconnectionchanged(
|
|||
}
|
||||
|
||||
// Called on the UI thread
|
||||
JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_key(JNIEnv *env, jclass clazz, jint p_keycode, jint p_physical_keycode, jint p_unicode, jboolean p_pressed) {
|
||||
JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_key(JNIEnv *env, jclass clazz, jint p_physical_keycode, jint p_unicode, jint p_key_label, jboolean p_pressed) {
|
||||
if (step.get() <= 0) {
|
||||
return;
|
||||
}
|
||||
input_handler->process_key_event(p_keycode, p_physical_keycode, p_unicode, p_pressed);
|
||||
input_handler->process_key_event(p_physical_keycode, p_unicode, p_key_label, p_pressed);
|
||||
}
|
||||
|
||||
JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_accelerometer(JNIEnv *env, jclass clazz, jfloat x, jfloat y, jfloat z) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue