summaryrefslogtreecommitdiff
path: root/quantum/mousekey.c
diff options
context:
space:
mode:
authorフィルターペーパー <76888457+filterpaper@users.noreply.github.com>2023-09-25 10:25:24 +0800
committerGitHub <noreply@github.com>2023-09-25 12:25:24 +1000
commit246f3cb4d2d84df7869709d0f9ae5f3e2d99d4cc (patch)
tree5d193c1e8860a17e4f09478276f7f8a9ddb272f8 /quantum/mousekey.c
parent99290b4c7e891e69ca161d79c74a0e32014645bb (diff)
Improve directional transition of overlapping mouse keys (#21494)
Diffstat (limited to 'quantum/mousekey.c')
-rw-r--r--quantum/mousekey.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/quantum/mousekey.c b/quantum/mousekey.c
index c982a2f40b..3910811752 100644
--- a/quantum/mousekey.c
+++ b/quantum/mousekey.c
@@ -389,7 +389,20 @@ void mousekey_on(uint8_t code) {
389 if (mouse_timer == 0) { 389 if (mouse_timer == 0) {
390 mouse_timer = timer_read(); 390 mouse_timer = timer_read();
391 } 391 }
392# endif /* #ifdef MK_KINETIC_SPEED */ 392# endif
393
394# ifndef MOUSEKEY_INERTIA
395 // If mouse report is not zero, the current mousekey press is overlapping
396 // with another. Restart acceleration for smoother directional transition.
397 if (mouse_report.x || mouse_report.y || mouse_report.h || mouse_report.v) {
398# ifdef MK_KINETIC_SPEED
399 mouse_timer = timer_read() - (MOUSEKEY_INTERVAL << 2);
400# else
401 mousekey_repeat = MOUSEKEY_MOVE_DELTA;
402 mousekey_wheel_repeat = MOUSEKEY_WHEEL_DELTA;
403# endif
404 }
405# endif // ifndef MOUSEKEY_INERTIA
393 406
394# ifdef MOUSEKEY_INERTIA 407# ifdef MOUSEKEY_INERTIA
395 408