diff options
author | QMK Bot <hello@qmk.fm> | 2022-06-28 22:29:19 +0000 |
---|---|---|
committer | QMK Bot <hello@qmk.fm> | 2022-06-28 22:29:19 +0000 |
commit | 2daad28ab1b5e84c7ea8c9452eeac521f9fa2c9c (patch) | |
tree | d6bcfbb28c1ca616dc3580e6472b198611bc6649 /quantum | |
parent | 54383674db8128b68ee91493ef45e66b2e2f8d77 (diff) | |
parent | 43f8d365ba01b1e61b0c6cbbf6ef28eea9dee2b9 (diff) |
Merge remote-tracking branch 'origin/master' into develop
Diffstat (limited to 'quantum')
-rw-r--r-- | quantum/mousekey.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/quantum/mousekey.c b/quantum/mousekey.c index 81e887d529..3ecdfccb22 100644 --- a/quantum/mousekey.c +++ b/quantum/mousekey.c @@ -74,6 +74,10 @@ uint8_t mk_wheel_interval = MOUSEKEY_WHEEL_INTERVAL; uint8_t mk_wheel_max_speed = MOUSEKEY_WHEEL_MAX_SPEED; uint8_t mk_wheel_time_to_max = MOUSEKEY_WHEEL_TIME_TO_MAX; +bool should_mousekey_report_send(report_mouse_t *mouse_report) { + return mouse_report->x || mouse_report->y || mouse_report->v || mouse_report->h; +} + # ifndef MK_COMBINED # ifndef MK_KINETIC_SPEED @@ -257,7 +261,7 @@ void mousekey_task(void) { } } - if (has_mouse_report_changed(&mouse_report, &tmpmr)) { + if (has_mouse_report_changed(&mouse_report, &tmpmr) || should_mousekey_report_send(&mouse_report)) { mousekey_send(); } memcpy(&mouse_report, &tmpmr, sizeof(tmpmr)); @@ -363,7 +367,7 @@ void mousekey_task(void) { mouse_report.h = tmpmr.h; } - if (has_mouse_report_changed(&mouse_report, &tmpmr)) { + if (has_mouse_report_changed(&mouse_report, &tmpmr) || should_mousekey_report_send(&mouse_report)) { mousekey_send(); } memcpy(&mouse_report, &tmpmr, sizeof(tmpmr)); |