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

fix(hid): Fix scroll value truncation #2865

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

adolto
Copy link

@adolto adolto commented Mar 10, 2025

Fix 8 bit truncation of 16 bit scroll values when passed into functions zmk_hid_mouse_scroll_set and zmk_hid_mouse_scroll_update.

Fixes: #2864

PR check-list

  • Branch has a clean commit history
  • Additional tests are included, if changing behaviors/core code that is testable.
  • Proper Copyright + License headers added to applicable files (Generally, we stick to "The ZMK Contributors" for copyrights to help avoid churn when files get edited)
  • Pre-commit used to check formatting of files, commit messages, etc.
  • Includes any necessary documentation changes.

Fix 8 bit truncation of 16 bit scroll values when passed into
functions `zmk_hid_mouse_scroll_set` and
`zmk_hid_mouse_scroll_update`.

Fixes: zmkfirmware#2864
@adolto adolto requested a review from a team as a code owner March 10, 2025 23:19
@caksoylar
Copy link
Contributor

caksoylar commented Mar 11, 2025

Looks right to me, although the int8_t vs. int16_t difference between move/scroll is pretty glaring in the header. @petejohanson was there an intention or is it just a bug that scroll uses 8 bit values?

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.

Larger scroll values are incorrectly set
2 participants