bigwheels icon indicating copy to clipboard operation
bigwheels copied to clipboard

Add input handling to Android

Open Keenuts opened this issue 1 year ago • 3 comments

Some samples rely on keyboard/mouse inputs. This is not available on Android, so we should find a way to add input support (accel, touch?)

Keenuts avatar Apr 07 '23 09:04 Keenuts

We do have ImGui input handling now, not sure if we want to add virtual keyboard or bluetooth kb/m

hysw avatar May 01 '23 22:05 hysw

It's more about the mouse/keyboard samples, and samples using the mouse to modify camera positions. Those aren't working on android AFAIK no?

Keenuts avatar May 02 '23 12:05 Keenuts

We need mouse emulation on Android using the touch events. The first touch event should issue a MouseDown and this touch event becomes the primary touch using its touch id. All subsequent touches (aka secondary touches) do not issue any mouse events. I think this model is good enough. MouseUp is issued when primary touch is lost.

On art installation touchscreen apps, we used to have the primary touch fall back to secondary touches if the initial touch was lost and the last touch primary touch issued the MouseUp. For our mouse emulation this might be too much. Especially if we want to use the second touch as a potential right click.

Moues emulation should be opt-in in the app settings. We can default it to true for now until we find what's the best fit.

chaoticbob avatar May 02 '23 17:05 chaoticbob