-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Absolute mouse (touchscreen) HID support #620
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
Comments
I did a little research on this. It may be an issue finding report descriptors that will work on all the major platforms. Paul Stoffregen has implemented touchscreen HID support for Teensy. The report descriptor he developed I think appears to work on Windows and Mac without external drivers; it may not work on Linux (or at least Raspbian). Some background here and in other forum posts: https://forum.pjrc.com/threads/32331-USB-HID-Touchscreen-support-needed |
Latent support in #776, but not turned on. Needs more testing: it appears touchscreen and gamepad on the same HID endpoints might conflict on at least some platforms (Linux). Might need to wait for dynamic HID descriptors. Also current report descriptor (emulating a digitizer with stylus), does not necessarily seem to do the right thing with existing built-in drivers on all platforms. |
Now available via user-defined HID descriptors. |
woohoo 3 year old issue :D |
While I understand how this solves the problem in theory, is there an example or doc that has the descriptor and hid code to process it? |
Digitizer descriptor that worked on at least some systems: https://github.com/adafruit/circuitpython/blob/6.3.x/tools/hid_report_descriptors.py#L341-L406 I don't know what Python library I was using with this, if any. I may have just seen whether the OS recognized it, as opposed to trying to send a report. |
For extra compatibility, these are the USB descriptors that QEMU/KVM use, https://github.com/qemu/qemu/blob/master/hw/usb/dev-hid.c#L486-L524 |
If anyone ends up here by google: I've created an example for absolute mouse here: https://gist.github.com/bitboy85/cdcd0e7e04082db414b5f1d23ab09005 Edit: Additional Info: I've testet on Linuxmint 20 and a dual screen setup. Coordinates 0,0 is the upper left corner of the left screen while 32767,32767 is the bottom right corner of the right screen. I've read somwhere that this behaviour on windows is different but i'm unable to test. |
Anyone have a working example with CircuitPython 7.0? |
I have one and will upload it here over the weekend. |
UPDATE: This finally works for me (Windows 10): Any news? That would be very helpful. Thanks.
|
Good one to do when we do multimedia key support (i believe we just need to craft the report API)
The text was updated successfully, but these errors were encountered: