-
Notifications
You must be signed in to change notification settings - Fork 435
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Android Input Keys - BACK and MENU buttons #2218
Comments
Thank you! |
Thanks, perhaps @JoeCreates or someone could commit the fix to Flixel itself 😄 |
@Tw1ddle Why not just open a PR yourself? ;) I think we want to have conditionals for old OpenFL versions / the old values though, we haven't dropped OpenFL 3.6.1 support yet. |
Thanks for the investigation! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
1.
Finally I moved from OpenFL 3.6.1 and Flixel 3.3.5 to the latest versions. And BANG! On Android the BACK button stops to work the way as it worked before.
I used FlxG.android.preventDefaultKeys(27) in my code.
So, after a big investigation I found where the problem was. In Lime 7.3.0 (and in the earlier versions) android codes for BACK button are changed from "27" (decimal) to "var APP_CONTROL_BACK = 0x4000010E;" and code of MENU button from "16777234" (decimal) to "var APP_CONTROL_SEARCH = 0x4000010C; ".
I made changes on my side in flixel/input/android/FlxAndroidKeys.hx and flixel/input/android/FlxAndroidKey.hx by replacing old values to the new ones and it starts to work!
2.
I found that in
flixel/flixel/input/FlxKeyManager.hx
Line 278 in 984124c
I suggest to add #android also, because whithout that BACK button event doesn't prevented on Android.
Code snippet:
Sorry for English
The text was updated successfully, but these errors were encountered: