[Android] Improve handling of keyboard, dpad and gamepad events Thanks Dimitris Zenios for the report!