From 7cb4f60a213aa9b71fca36f73edc9a42d35d334d Mon Sep 17 00:00:00 2001 From: Florian Didron Date: Thu, 4 Dec 2025 15:08:47 +0700 Subject: [PATCH] fix(trackpad): stop scrolling when the second finger is lift off during the gesture --- drivers/sensors/navigator_trackpad.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/drivers/sensors/navigator_trackpad.c b/drivers/sensors/navigator_trackpad.c index 8ece1c252b..1fb7d72c83 100644 --- a/drivers/sensors/navigator_trackpad.c +++ b/drivers/sensors/navigator_trackpad.c @@ -518,6 +518,13 @@ report_mouse_t navigator_trackpad_get_report(report_mouse_t mouse_report) { // Determine mode based on finger count if (fingers >= 2 && gesture.state != TP_SCROLLING) { gesture.state = TP_SCROLLING; + } else if (fingers < 2 && gesture.state == TP_SCROLLING) { + // Transition from scrolling back to moving when finger is lifted + gesture.state = TP_MOVING; +# ifdef NAVIGATOR_TRACKPAD_SCROLL_INERTIA_ENABLE + // Stop scroll inertia when transitioning to cursor mode + scroll_inertia.active = false; +# endif } # endif