From 39f781494372425f0e676dcb05822c7bd5fd4101 Mon Sep 17 00:00:00 2001 From: Florian Didron Date: Thu, 4 Sep 2025 09:34:28 +0700 Subject: [PATCH] feat(automouse): adds automouse scroll threshold parameter (#416) --- quantum/pointing_device/pointing_device_auto_mouse.c | 2 +- quantum/pointing_device/pointing_device_auto_mouse.h | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/quantum/pointing_device/pointing_device_auto_mouse.c b/quantum/pointing_device/pointing_device_auto_mouse.c index 0f53f5ca69..5b57b5b579 100644 --- a/quantum/pointing_device/pointing_device_auto_mouse.c +++ b/quantum/pointing_device/pointing_device_auto_mouse.c @@ -243,7 +243,7 @@ __attribute__((weak)) bool auto_mouse_activation(report_mouse_t mouse_report) { auto_mouse_context.total_mouse_movement.y += mouse_report.y; auto_mouse_context.total_mouse_movement.h += mouse_report.h; auto_mouse_context.total_mouse_movement.v += mouse_report.v; - return abs(auto_mouse_context.total_mouse_movement.x) > AUTO_MOUSE_THRESHOLD || abs(auto_mouse_context.total_mouse_movement.y) > AUTO_MOUSE_THRESHOLD || abs(auto_mouse_context.total_mouse_movement.h) > AUTO_MOUSE_THRESHOLD || abs(auto_mouse_context.total_mouse_movement.v) > AUTO_MOUSE_THRESHOLD || mouse_report.buttons; + return abs(auto_mouse_context.total_mouse_movement.x) > AUTO_MOUSE_THRESHOLD || abs(auto_mouse_context.total_mouse_movement.y) > AUTO_MOUSE_THRESHOLD || abs(auto_mouse_context.total_mouse_movement.h) > AUTO_MOUSE_SCROLL_THRESHOLD || abs(auto_mouse_context.total_mouse_movement.v) > AUTO_MOUSE_SCROLL_THRESHOLD || mouse_report.buttons; } /** diff --git a/quantum/pointing_device/pointing_device_auto_mouse.h b/quantum/pointing_device/pointing_device_auto_mouse.h index 2c0d4d1043..7689234eb4 100644 --- a/quantum/pointing_device/pointing_device_auto_mouse.h +++ b/quantum/pointing_device/pointing_device_auto_mouse.h @@ -45,6 +45,9 @@ #ifndef AUTO_MOUSE_THRESHOLD # define AUTO_MOUSE_THRESHOLD 10 #endif +#ifndef AUTO_MOUSE_SCROLL_THRESHOLD +# define AUTO_MOUSE_SCROLL_THRESHOLD AUTO_MOUSE_THRESHOLD +#endif /* data structure */ typedef struct {