-
Notifications
You must be signed in to change notification settings - Fork 2
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
2D scrolling #1
Comments
Wait … there is only Edit: Reading the actual API header, it looks to me like we can truly use all 8 bits of the button integer for 8 buttons. I imagine I can hack up the Arduino to report so that I can copy my PS/2 xinput config:
In the end, that's the most flexible way. I see value in handling scrolling internally, but without extending the HID API, this only works for one axis. A control pin it should be, then, to switch internal scrolling on and off, don't you think? |
See pull request #2. |
I actually wanted to implement 2d scrolling (and "hires scrolling" with smaller steps), but these extended HID things are rather complicated unfortunately, so I did not yet start with that. PR #2 is merged, so this can be made to work with Linux now, but long term I'd like to have a platform agnostig solution in the converter code, which should work on all OSes without additional configuration. If you happen to beat me to implementing this, that would of course be very welcome ;-) |
I was able to test the code now on a 32u4 Arduino Pro Micro with the T-CJ12. It seems to need a reinsertion when combined with usbguard after allow-device (maybe some hook to re-init hardware when the kernel driver is allowed to work is needed, normal devices work right away after lifting the software block).
But to come to the issue: I see that the red button is directly translated to scroll events in the Arduino. This spares any extra software setup on the PC, but it prevents the full experience: two-dimensional scrolling in both axes! How can you live without? ;-)
[Edit: Was misled by debugging output to serial port.]
I see https://www.arduino.cc/reference/en/language/functions/usb/mouse/mousemove/ being used
So this API doesn't allow for 2D scrolling.
The solution is to just pass through the red button and use xinput to configure things? Maybe we can use some idle pins to provide a switch for hardware of software scrolling mode. Hacking up the red button passthrough should be easy enough, actually easier than handling scrolling directly.
(Also: A custom device string would be nice if software scrolling needs to be configured …)
The text was updated successfully, but these errors were encountered: