From 21b84596e7c372eeeedcf41a32c6c25379cd8f0e Mon Sep 17 00:00:00 2001 From: フィルターペーパー <76888457+filterpaper@users.noreply.github.com> Date: Mon, 19 Aug 2024 10:18:28 +0800 Subject: Enhance overlapping mouse keys control (#23341) Enhance the overlapping mouse key press acceleration (introduced in #21494) with user preprocessor controls. --- quantum/mousekey.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'quantum/mousekey.c') diff --git a/quantum/mousekey.c b/quantum/mousekey.c index 8683cfdffa..9649943a0d 100644 --- a/quantum/mousekey.c +++ b/quantum/mousekey.c @@ -391,18 +391,18 @@ void mousekey_on(uint8_t code) { } # endif -# ifndef MOUSEKEY_INERTIA +# if defined(MOUSEKEY_OVERLAP_RESET) && !defined(MOUSEKEY_INERTIA) // If mouse report is not zero, the current mousekey press is overlapping // with another. Restart acceleration for smoother directional transition. if (mouse_report.x || mouse_report.y || mouse_report.h || mouse_report.v) { # ifdef MK_KINETIC_SPEED - mouse_timer = timer_read() - (MOUSEKEY_INTERVAL << 2); + mouse_timer = timer_read() - MOUSEKEY_OVERLAP_INTERVAL; # else - mousekey_repeat = MOUSEKEY_MOVE_DELTA; - mousekey_wheel_repeat = MOUSEKEY_WHEEL_DELTA; + mousekey_repeat = MOUSEKEY_OVERLAP_MOVE_DELTA; + mousekey_wheel_repeat = MOUSEKEY_OVERLAP_WHEEL_DELTA; # endif } -# endif // ifndef MOUSEKEY_INERTIA +# endif // defined(MOUSEKEY_OVERLAP_RESET) && !defined(MOUSEKEY_INERTIA) # ifdef MOUSEKEY_INERTIA -- cgit v1.2.3