-
-
Notifications
You must be signed in to change notification settings - Fork 6.4k
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
Proper mouse support for Android backend #2310
Conversation
We'll have to trust you I guess, I've never used a mouse with Android so couldn't verify this is correct and doesn't break anything. |
This could be tested with a bluetooth mouse, a USB mouse with a OTG adapter, or a tablet which have a full-size USB connector. (Or a touchpad in the case of the Transformer's dock) |
I don't have any of those things. |
I understand, although anyone can test that it doesn't break anything on the normal touch operations without using a mouse. As far as the mouse is concerned, someone else might be able to test it and confirm that it's working as intended. |
I understand that... I was just stating that I don't have those things so I won't be able to test and verify this works before merging. |
I have an OTG cable around here somewhere for my Nexus 7 (2013). I can test tonight and report back. |
Cool, thanks @unkn0wn0ne. |
I just tried this on my Ouya (don't know why I didn't think about it before) and it correctly tracks the movement of the touchpad on the controller. I was also able to track movement/scroll/buttons from a USB mouse I plugged in. |
Ah, I also should have thought of that. I have an Ouya. |
d6fa820
to
fea97ff
Compare
fea97ff
to
e0becd7
Compare
Did you guys get a chance to try it out? |
e0becd7
to
1a0fbef
Compare
@MobiDevelop is this good to go? |
I haven't had a chance to try it with an actual mouse, but it doesn't break |
I have tested it thoroughly on various devices, with and without a mouse. |
Proper mouse support for Android backend
This PR adds the handling of mouse cursor movement and scroll wheel on Android 3.1+. It also correctly report the mid and right mouse buttons on 4.0+
I've tested this with a USB mouse and the touchpad on my ASUS Transformer tablet. (Had to manually configure the tablet not to report mid/right buttons as menu and back.) I've also tested it on my old Archos 43 to make sure I didn't break anything all the way back to Android 2.2.