godot/platform/android
lawnjelly 512f8ebb93 Fix some keyboards not working with Android
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.
2019-06-21 12:57:33 +01:00
..
export Merge pull request #29910 from m4gr3d/dev_deprecate_armv6 2019-06-20 10:22:23 +02:00
java Fix some keyboards not working with Android 2019-06-21 12:57:33 +01:00
SCsub Deprecate armv6 support for Android 2019-06-19 12:05:58 -07:00
audio_driver_jandroid.cpp Update copyright statements to 2019 2019-01-01 12:58:10 +01:00
audio_driver_jandroid.h Restructuring glue code to make it easier to extend 2019-04-05 21:44:06 +11:00
audio_driver_opensl.cpp Use mix rate and output latency constants in audio drivers 2019-04-06 12:37:25 +02:00
audio_driver_opensl.h Request Android record permission when needed 2019-03-08 12:38:36 -03:00
detect.py Deprecate armv6 support for Android 2019-06-19 12:05:58 -07:00
dir_access_jandroid.cpp Android: Fixed problems with memory leaks due to absent ReleaseStringUTFChars calls. 2019-02-27 15:11:08 +03:00
dir_access_jandroid.h Restructuring glue code to make it easier to extend 2019-04-05 21:44:06 +11:00
file_access_android.cpp Update copyright statements to 2019 2019-01-01 12:58:10 +01:00
file_access_android.h Add FileAccess::set_unix_permissions for Unix platforms 2019-04-07 15:45:30 -03:00
file_access_jandroid.cpp Update copyright statements to 2019 2019-01-01 12:58:10 +01:00
file_access_jandroid.h Add FileAccess::set_unix_permissions for Unix platforms 2019-04-07 15:45:30 -03:00
java_class_wrapper.cpp Android: Fixed problems with memory leaks due to absent ReleaseStringUTFChars calls. 2019-02-27 15:11:08 +03:00
java_class_wrapper.h Update copyright statements to 2019 2019-01-01 12:58:10 +01:00
java_godot_io_wrapper.cpp Change "ID" to lowercase "id" 2019-05-09 06:25:32 -04:00
java_godot_io_wrapper.h Change "ID" to lowercase "id" 2019-05-09 06:25:32 -04:00
java_godot_lib_jni.cpp Restructuring glue code to make it easier to extend 2019-04-05 21:44:06 +11:00
java_godot_lib_jni.h Fix typos with codespell 2019-05-19 13:10:35 +02:00
java_godot_wrapper.cpp Setup Godot to support the Oculus Mobile SDK. 2019-05-30 16:35:50 -07:00
java_godot_wrapper.h Setup Godot to support the Oculus Mobile SDK. 2019-05-30 16:35:50 -07:00
logo.png Optimize images losslessly using `oxipng -o6 --strip all --zopfli` 2018-06-28 19:17:41 +02:00
os_android.cpp Adding a new Camera Server implementation to Godot. 2019-06-15 21:30:32 +10:00
os_android.h Adding a new Camera Server implementation to Godot. 2019-06-15 21:30:32 +10:00
platform_config.h Update copyright statements to 2019 2019-01-01 12:58:10 +01:00
power_android.cpp Platform: Ensure classes match their header filename 2019-02-12 16:56:25 +01:00
power_android.h Platform: Ensure classes match their header filename 2019-02-12 16:56:25 +01:00
run_icon.png Optimize images losslessly using `oxipng -o6 --strip all --zopfli` 2018-06-28 19:17:41 +02:00
string_android.h Android: Fixed problems with memory leaks due to absent ReleaseStringUTFChars calls. 2019-02-27 15:11:08 +03:00
thread_jandroid.cpp Improve custom thread numbering for POSIX 2019-01-25 00:59:07 +01:00
thread_jandroid.h Update copyright statements to 2019 2019-01-01 12:58:10 +01:00