mirror of
https://github.com/godotengine/godot.git
synced 2024-11-27 09:16:35 +08:00
512f8ebb93
Fixes #17004 Currently the keydown and keyup messages are handled with method like this: if ((source & InputDevice.SOURCE_JOYSTICK) == InputDevice.SOURCE_JOYSTICK || (source & InputDevice.SOURCE_DPAD) == InputDevice.SOURCE_DPAD || (source & InputDevice.SOURCE_GAMEPAD) == InputDevice.SOURCE_GAMEPAD) { // joystick input } else { // keyboard input } The constant for SOURCE_DPAD is 513 10 0000 0001 and the constant for SOURCE_KEYBOARD is 257 1 0000 0001 However, rather confusingly, for many keyboards the source sent by android is 769 11 0000 0001 Thus the keyboard is passing the check as being a DPAD and being processed as a joystick rather than keyboard. This PR handles the specific case of 769, allowing input from physical keyboards. |
||
---|---|---|
.. | ||
export | ||
java | ||
audio_driver_jandroid.cpp | ||
audio_driver_jandroid.h | ||
audio_driver_opensl.cpp | ||
audio_driver_opensl.h | ||
detect.py | ||
dir_access_jandroid.cpp | ||
dir_access_jandroid.h | ||
file_access_android.cpp | ||
file_access_android.h | ||
file_access_jandroid.cpp | ||
file_access_jandroid.h | ||
java_class_wrapper.cpp | ||
java_class_wrapper.h | ||
java_godot_io_wrapper.cpp | ||
java_godot_io_wrapper.h | ||
java_godot_lib_jni.cpp | ||
java_godot_lib_jni.h | ||
java_godot_wrapper.cpp | ||
java_godot_wrapper.h | ||
logo.png | ||
os_android.cpp | ||
os_android.h | ||
platform_config.h | ||
power_android.cpp | ||
power_android.h | ||
run_icon.png | ||
SCsub | ||
string_android.h | ||
thread_jandroid.cpp | ||
thread_jandroid.h |