-
Notifications
You must be signed in to change notification settings - Fork 4
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
int to signed byte #1
Comments
Yes, the full range of a signed byte is [-128;127] however the HID descriptor for the mouse input has the coordinate range of [-127;127]. I followed some example HID descriptors from the devices I have in this regard. I guess that the reason for using symmetrical values is to have the max mouse speed consistent in both directions. As for the absolute movement it is indeed not possible with a HID mouse interface. Trackpads typically send absolute values but this would not help, since the OS would still translate those into relative motion of the mouse pointer. My bet is that the best results you could get via HID emulation is to use touch screen input. However there are limitations there as well. The OS will potentially treat touches differently than mouse clicks, it is not possible to emulate right or middle mouse button, the mouse pointer will not move, and some OSes will not support external HID touch screen at all (likely iOS, Android and Mac OS X). |
thanks for the clarification. I noticed the -127/127 now when you mentioned it. I got somewhat ok results scripting mouse movement on IOS using relative motion only. (once i found the equivalent to acceleration setting and turned it off ). I do however notice that some motions is missed. I think i might send to fast. or out of sync or something. Adding a 0.06 delay gives ~98% accuracy. 0.1 gives 100% - but that's a bit slow. Do you think i should try to only send data in fixed intervals. Que them and send every 0.01-0.02 sec? Maybe i should try increasing the min/max to also, to allow bigger cross screen jumps in one report. |
the lower boundary should be -128.
Just realized this was your code - noticed it at https://github.com/quangthanh010290/keyboard_mouse_emulate_on_raspberry and commented there.
You wouldn't have any ideas what would be needed to send absolute coordinates. Can that be done while emulating a mouse or would you need to emulate some other device class?
The text was updated successfully, but these errors were encountered: