Skip to content
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

Open
wants to merge 10 commits into
base: master
Choose a base branch
from

Conversation

WaGi-Coding
Copy link

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

@NicoHood
Copy link
Owner

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.

@WaGi-Coding
Copy link
Author

WaGi-Coding commented Dec 31, 2022

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.
@darylwright
Copy link

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
@WaGi-Coding
Copy link
Author

WaGi-Coding commented Mar 31, 2023

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!

@NicoHood
Copy link
Owner

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;
Copy link
Owner

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?

@darylwright
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants