NicoHood / HID

Bring enhanced HID functions to your Arduino!
http://www.nicohood.de
MIT License
2.37k stars 409 forks source link

Adding Horizontal Scroll Mouse Wheel Support #393

Open WaGi-Coding opened 1 year ago

WaGi-Coding commented 1 year ago

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 commented 1 year ago

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 commented 1 year ago

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

darylwright commented 1 year ago

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.

WaGi-Coding commented 1 year ago

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 commented 1 year ago

If the function has a default value, why would it break?

darylwright commented 1 year ago

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.