this lets you manually define which control handlers are tried first, for debugging, curiosity, and also usability on some "special case" devices (until auto detection is a thing)
- the prompt only shows once so users can use fake dpad if they wish
- optimized fallback by checking if ime is actually connected before using ime dpad. this saves a (noticeable) few hundred milliseconds when the ime is misbehaving.
there may be remaining edge cases, but hopefully this should work in the majority of scenarios.
I've tested and verified:
- single/long press with no ime on native buttons
- single/long press with ime on native buttons
- single/long press with ime on native buttons with broken focus (requiring fallback)
- single/long press with ime on non-native buttons
- single/long press with ime within games
- single press with no ime on fake focus
- single press with ime on fake focus
- single press with ime on system prompts (requiring fallback)
the select button can now use tryImeDpad(), which fixes some system prompts and avoids the issue where selecting the first option in a settings dialog doesn't work until you move the dpad.
this also fixes the google account sign in page, as it's able to detect the movements there now.
the downside is that the events seem to take forever (100-300 ms) to fire. this means there's now a considerable delay before the fallback is used. It's probably not a big deal since most daily usage won't require the fallback at all anyway.
the only real bug left (that I know of): when ime dpad is used but fake dpad fake focus is active, there is both a real and fake focus at the same time, and they (usually) don't agree. this is not as simple as turning off fake dpad focus when ime dpad is active since that would make the ime input switcher inaccessible (as the ime dpad cannot navigate the ime switcher)