I did more test today and I have to say this seems to be a problem specific to my iPega controller. Some findings:
1. This happens in a lot of other apps including Chrome, Play store, Google map, etc. but not in PPSSPP.
2. My iPega controller has two modes, one is called direct play mode, which doesn’t have this issue but I need to use a separate key mapping app to simulate screen touch which is not very easy to use. The other one (which is the one I’m currently using) is called Android standard mode which doesn’t require additional app but has this issue.
3. I also tried some other devices including Dualshock 4 and a normal bluetooth keyboard, none of them have this issue.
But since PPSSPP doesn’t have this problem I guess this can be fixed by correctly handling some event?