-
-
Notifications
You must be signed in to change notification settings - Fork 409
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
Adding Horizontal Scroll Mouse Wheel Support #393
base: master
Are you sure you want to change the base?
Conversation
I did not test this, but just looking at it, it seems fine to me. However I am not sure if this will break some other devices, as the descriptor is now more complex, not sure. |
So far it all works fine for me. Playing around with 2 Rotary Encoders simulating a mouse. With held down buttons, while still being able to move, so you can drag stuff around or draw & an optional setting to simulate a held press by holding the button for half a second, as it could be hard to hold down and move with that setup ^^ Also with option to switch between modes (mouse, scroll, volume/seekbar) & a TFT for configuring that to ones likings. Maybe implementing a whole keyboard you can use with the encoders and the TFT, to test it more in combination with other devices. Would be great if others could test their existing, more complex projects with that pull request fork to make sure. Greetings and happy new year |
The new scroll method ensures that we can add horizontal scroll support without breaking existing projects by changing the API.
Hi @WaGi-Coding, I sent you a pull request on your fork. I suggest the horizontal scroll functionality be put in a separate method so as not to break existing projects by changing the API. This should address @NicoHood's concerns. Please let me know what you think of these changes. |
Moved horizontal scroll functionality to a separate method
Thanks @darylwright, I merged it into my forks master/base branch and left the old code in another branch, because i refer to it in a tutorial. Many thanks! |
If the function has a default value, why would it break? |
} | ||
|
||
void AbsoluteMouseAPI::scroll(signed char wheel, signed char hWheel){ | ||
HID_MouseAbsoluteReport_Data_t report; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did you test this? Doesnt this set the cursor to a fixed position, maybe 0,0?
As I mentioned in @WaGi-Coding's fork, my changes were not necessary and those prior to my involvement were satisfactory. Apologies for the inconvenience. |
Might need to get checked more, but seems everything still works fine with my tests.
With this, you cann pass a 4th parameter for horizontal scroll value in Mouse and AbsoluteMouse move/moveTo
Please review