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
hid-gadget-test: Keyboard works, but the mouse does not work #135
Comments
I am not sure if you have seen this problem or not: #109 but it manages to get the mouse to work on windows although it isn't as nice |
Thank you for answer. I try, but cant do this correctly =( when I try do this (left click) what am I doing wrong? thank u one more time) |
Your command is not in the correct format, it should look like this: this is different because you were using the format of |
You also have not entered the value for the left click properly either so I thought I would share with you what I have found the various values need to be. The format for the mouse data is as follows: \x(Button)\x(X Pos)\x(Y Pos)\x(Scroll Wheel) The button values follow this:
(So a value of 0 is no click, 1 is left, 2 is right and 4 is middle/scroll click) The X Position and Y Position can be any value between -127 and 127. This represents pixels and is relative to where the mouse currently is. e,g if you are at the point 150, 150 then you can move the mouse anywhere that is within 127 pixels of this point (23, 23) and (277, 277) would be the maximums. Therefore, if the mouse is at 0,0 (top left corner) and you want to move to 1920, 1080 (bottom right corner) Then you would need to move the mouse a few times 127 pixels at a time (or less) in either direction. The scroll wheel value can either be 1 for scrolling up, or 255 for scrolling down. This will then move 3 lines by default in windows each time this is run. IMPORTANT: All of these values need to be input as hex using the format above so you can use a hex converter to get the values you need. Examples: (Left click) (Move Mouse) (Mouse Move 2) Another note: you do not have to move in both the x and y direction at the same time you can just do one at time. (Mouse Scroll Up) (Mouse Scroll Down) |
it works Thank you very mach, for u best explanations! |
Hey.
Model: ASUS_Z00LD
Android version: 7.1
CyanogenMod version: 14.1-20161106-UNOFFICIAL-Z00L
Communication module firmware: 202c10_11.1.0_160304
Kernel version: 3.10.108-FireKernel-r2.4
Assembly number: cm_Z00L-userdebug 7.1 Control keys NDE63P 453e4e7c2a
.
What and how I do:
Windows 8.1, from the command line I execute the connection:
The commands for the keyboard are working (returns "recv report: 01", and pressing the key):
adb shell "echo a ./data/local/tmp/hid-gadget-test / dev / hidg0 keyboard"
For example, mouse command (returns nothing, do not press mouse:
adb shell "echo -b2 | ./data/local/tmp/hid-gadget-test / dev / hidg1 mouse"
p.s. issue, not critical for me:
Lineage OS 15.1 with the kernel FireKernel 2.4: another problem (similar to this #117) - freezes the command panel, from those commands that work on other firmware. Does the oreo work?
The text was updated successfully, but these errors were encountered: