Skip to content
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: Improve mouse input #19915

Merged
merged 5 commits into from
Mar 5, 2025
Merged

Android: Improve mouse input #19915

merged 5 commits into from
Mar 5, 2025

Conversation

hrydgard
Copy link
Owner

@hrydgard hrydgard commented Jan 23, 2025

Mouse on Android is really wacky unfortunately.. but with this, it mostly works on my pocophone f1, buttons are mappable separately. And also on my Galaxy S21. On the pocophone, the right mouse button starts working after a few clicks...

Fixes #19186

Fixes the mouse problem in #19862 .

Adds touch support to ImGui on Android.

@hrydgard hrydgard added this to the v1.19.0 milestone Jan 23, 2025
@hrydgard
Copy link
Owner Author

hrydgard commented Feb 12, 2025

Testing on a more modern phone than the pocophone f1, I'm having issues with duplicate mouse button events. Both getting input from onGenericMotionEvent (MotionEvent.ACTION_BUTTON_PRESS) and from onTouchEvent on the surfaceview. While on the older phone I was only getting events from the surfaceview. However on ChromeOS and newer phones the former is what you should use.

So will have to do some kind of version cutoff I guess... or, as soon as we see a "modern" event, we switch over.

@hrydgard hrydgard force-pushed the android-mouse-work branch 2 times, most recently from 39f215d to ab36dec Compare March 5, 2025 21:48
@hrydgard
Copy link
Owner Author

hrydgard commented Mar 5, 2025

OK, now I have the full feature set working on a phone supporting all the modern stuff. Now just gotta go back and check that things are not crazy on an older one, before I merge... I'll leave that until tomorrow.

@hrydgard hrydgard force-pushed the android-mouse-work branch from ab36dec to 725f72a Compare March 5, 2025 22:26
@hrydgard hrydgard marked this pull request as ready for review March 5, 2025 22:26
@hrydgard hrydgard merged commit 9703a57 into master Mar 5, 2025
19 checks passed
@hrydgard hrydgard deleted the android-mouse-work branch March 5, 2025 23:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Android mouse support: Problem reported mapping left/right buttons
1 participant