mirror of
https://github.com/godotengine/godot.git
synced 2024-11-15 00:23:27 +00: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. |
||
---|---|---|
.. | ||
android | ||
haiku | ||
iphone | ||
javascript | ||
osx | ||
server | ||
uwp | ||
windows | ||
x11 | ||
register_platform_apis.h | ||
SCsub |