Skip to content

Commit

Permalink
fixup! feat(mouse): Add mouse move and scroll support
Browse files Browse the repository at this point in the history
  • Loading branch information
petejohanson committed Nov 15, 2024
1 parent 8e7687c commit 749ccfd
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions app/src/hid.c
Original file line number Diff line number Diff line change
Expand Up @@ -448,17 +448,15 @@ void zmk_hid_mouse_movement_update(int16_t hwheel, int16_t wheel) {
void zmk_hid_mouse_scroll_set(int8_t hwheel, int8_t wheel) {
mouse_report.body.d_scroll_x = hwheel;
mouse_report.body.d_scroll_y = wheel;
// mouse_report.body.d_scroll_x = (hwheel / (16 - mouse_res_feature_report.body.hwheel_res));
// mouse_report.body.d_scroll_y = (wheel / (16 - mouse_res_feature_report.body.wheel_res));

LOG_DBG("Mouse scroll set to %d/%d", mouse_report.body.d_scroll_x,
mouse_report.body.d_scroll_y);
}

void zmk_hid_mouse_scroll_update(int8_t hwheel, int8_t wheel) {
mouse_report.body.d_scroll_x += hwheel;
mouse_report.body.d_scroll_y += wheel;
// mouse_report.body.d_scroll_x += (hwheel / (16 - mouse_res_feature_report.body.hwheel_res));
// mouse_report.body.d_scroll_y += (wheel / (16 - mouse_res_feature_report.body.wheel_res));

LOG_DBG("Mouse scroll updated to X: %d/%d", mouse_report.body.d_scroll_x,
mouse_report.body.d_scroll_y);
}
Expand Down

0 comments on commit 749ccfd

Please sign in to comment.