-
-
Notifications
You must be signed in to change notification settings - Fork 40k
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
High resolution scrolling and extended mouse wheel reports #24347
base: develop
Are you sure you want to change the base?
Conversation
… correction in example code
A few changes:
|
Also just wanted to say this is a great first PR :) thank you for putting in all of the effort! |
No VUSB support? |
Oh my god there's separate USB HID descriptors in VUSB. I had no clue. I'd like to support VUSB, but I don't have any keyboards that use VUSB, so I'm not sure I'd be able to test any code I write... not sure how to get past this roadblock on my own. Earlier, I tried poking around at the VUSB code that handles USBRQ_HID_SET_REPORT. However, I was a bit confused - in ChibiOS and LUFA there's stuff there to deal with shared endpoints and NKRO, but not so in VUSB. I decided it would be safer to not touch anything, especially since I didn't have the ability to test any modified code. Maybe now that I know that VUSB has its own HID descriptors, I can take a deeper look, I guess. |
Also, I'd like to add that I've got the code ready for a default drag-scroll implementation hooked into |
I think I've managed to bodge together the appropriate modifications to VUSB. At this point, I haven't tested using LUFA or VUSB - only ChibiOS. Things compile on LUFA and VUSB, of course, but I don't have the hardware to actually verify that smooth scrolling works. |
…mpile when they're not defined
Description
This PR is for two closely related features (high resolution scrolling, and extended mouse wheel reports), as well as associated documentation.
Four settings macros/flags are added:
POINTING_DEVICE_HIRES_SCROLL_ENABLE
POINTING_DEVICE_HIRES_SCROLL_MULTIPLIER
POINTING_DEVICE_HIRES_SCROLL_EXPONENT
WHEEL_EXTENDED_REPORT
The first three modify QMK's mouse report descriptor to enable high resolution scrolling. The fourth enables extended wheel reports, which work just like extended mouse reports. Extended wheel reports are more-or-less necessary for high resolution scrolling to work properly, because otherwise the wheel reports are typically too big to fit in an
int8_t
.I also modified the USB report hooks in ChibiOS, LUFA, and VUSB by adding the ability to read resolution multiplier feature reports from the host computer. This allows the keyboard to know whether the host computer has chosen to use high-resolution scrolling (the keyboard can only advertise that it has high-resolution scrolling capability; the computer is in charge of deciding whether to use it). A function
bool is_hires_scroll_on(void)
is provided as an interface to this information. For platforms other than ChibiOS, LUFA, and VUSB, there is a default (weak) implementation of the function.Types of Changes
Issues Fixed or Closed by This PR
Checklist