minitouch
minitouch copied to clipboard
Support single touch event files
Some emulators do not have files supporting multitouch but single touch to emulate events. To support it the scoring was adapted to consider input files having that capability but still giving moultitouch the preference. Most important are two changes:
- State contains the event code attributes used to send the touch events depending on the property of the device.
- The function set_abs_configuration sets some information such as screen resolution and event code used for touches.
Hmm, it seems to just patch the coordinate events, I don't think we should be sending the other events (like syn_mt_report) at all. Could cause issues if left like that. On Wed, Mar 29, 2017 at 5:24 Konrad Weiss [email protected] wrote:
Some emulators do not have files supporting multitouch but single touch to emulate events. To support it the scoring was adapted to consider input files having that capability but still giving moultitouch the preference. Most important are two changes:
- State contains the event code attributes used to send the touch events depending on the property of the device.
- The function set_abs_configuration sets some information such as screen resolution and event code used for touches.
You can view, comment on, or merge this pull request online at:
https://github.com/openstf/minitouch/pull/15 Commit Summary
- Enable scoring for single touch devices such that certain emulators do not fail. Single touch devices get outscored by multitouch devices.
- Adding event code to state of devices, a function to configure the movement event code and the screensize.
- Fixes right scoring for multitouch devices
File Changes
- M jni/minitouch/minitouch.c https://github.com/openstf/minitouch/pull/15/files#diff-0 (56)
Patch Links:
- https://github.com/openstf/minitouch/pull/15.patch
- https://github.com/openstf/minitouch/pull/15.diff
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/openstf/minitouch/pull/15, or mute the thread https://github.com/notifications/unsubscribe-auth/AAB-_QaGxut1EpmAQ8zhuPQGVa3_kOtCks5rqWxkgaJpZM4MsJZw .
Yes, I send the right event depending on the capabilities of the device. I will do a test if I can leave that command out for single touch devices and will do a new commit.
I think I would kind of prefer if the events were not set dynamically, instead, the state would have a flag for the type (single/multi) and single touch would dispatch to a separate single-touch only method. That way it would be clearer what it does. There may be a need to add other methods later as well (e.g. stylus input which is a separate event device on some devices. On Wed, Mar 29, 2017 at 16:21 Konrad Weiss [email protected] wrote:
Yes, I send the right event depending on the capabilities of the device. I will do a test if I can leave that command out for single touch devices and will do a new commit.
— You are receiving this because you commented.
Reply to this email directly, view it on GitHub https://github.com/openstf/minitouch/pull/15#issuecomment-290005293, or mute the thread https://github.com/notifications/unsubscribe-auth/AAB-_ZJqWQblRiF7bSoKO28gYAXJBF4sks5rqgaHgaJpZM4MsJZw .
I could define a is_multitouch in state and depending on that perform the touch with the ABS_MT_POSITION_... or ABS_... events, if that is the the way you prefer it and better structures the project for your future extension?
Sorry, I was busy with a different project in the last month. I tried to interpret your suggestions in the correct manner and created different functions for single and multi touch events to remove the dynamically set event codes. I also removed syn_mt_report from the single_touch methods. As I don't know exactly which events are necessary, I did not dare to remove every event containing MT in the single touch methods. So if you want to remove more of them, tell me or just do it after pulling in case you accept the pull request.
Regards, Konrad
The best way to see which events are required would be to use an OTG cable to connect a mouse to a device, and then check what events it sends with getevent.
On Mon, May 8, 2017 at 19:10 Konrad Weiss [email protected] wrote:
Sorry, I was busy with a different project in the last month. I tried to interpret your suggestions in the correct manner and created different functions for single and multi touch events to remove the dynamically set event codes. I also removed syn_mt_report from the single_touch methods. As I don't know exactly which events are necessary, I did not dare to remove every event containing MT in the single touch methods. So if you want to remove more of them, tell me or just do it after pulling in case you accept the pull request.
Regards, Konrad
— You are receiving this because you commented.
Reply to this email directly, view it on GitHub https://github.com/openstf/minitouch/pull/15#issuecomment-299827544, or mute the thread https://github.com/notifications/unsubscribe-auth/AAB-_ZrFSxDLLAJ2iCpe9HWgxye61oJMks5r3uoYgaJpZM4MsJZw .
Is there any chance this MR will be merged someday? Or has minitouch.c evolved too far to merge? Thanks.
I want to try using a mouse with an OTG adapter first.
Got it, thanks.
Is there anything I can do on my side? I have the OTG adapter and the mouse. Thanks.
@gounthar you can try compiling minitouch with this PR applied and post your feedback here.
For the time being, I have a problem with downloading libedev behind the corporate proxy. :-1: I will keep you posted.
You might be able to use https://github.com/whot/libevdev instead, if you just replace one line in .gitmodules.
Thanks @sorccu . Before reading your comment, I had changed it to https://anongit.freedesktop.org/git/libevdev.git/
.
The first build is now finished.
I now have to find how to include my version on an STF Docker image...
@sorccu is there a documentation somewhere on how you pushed it on npm? Thanks.
You'd have to use a different package name. Other than that, npm publish
should do everything for you.
Thanks a lot, I will give it a try.
I recompiled, published, but this doesn't solve the mouse problem. ;-)
stf@stf-macmini:~$ adb shell /data/local/tmp/minitouch Note: device /dev/input/mice is not supported by libevdev Unable to find a suitable touch device
I have a similar use case - in my scenario, and Android-x86 VM running on top of qemu/kubevirt, exposing a mouse and keyboard only.
I've rebased this branch on top off minitouch master and updated the submodule to the latest libevdev; but I get the same results as @gounthar .
I will probably working around this by getting qemu to provide a tablet/touchpad device, but thought I'd leave this here anyway.