Browse Source

Improve directional transition of overlapping mouse keys (#21494)

pull/22123/head
フィルターペーパー 7 months ago
committed by GitHub
parent
commit
246f3cb4d2
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 14 additions and 1 deletions
  1. +14
    -1
      quantum/mousekey.c

+ 14
- 1
quantum/mousekey.c View File

@ -389,7 +389,20 @@ void mousekey_on(uint8_t code) {
if (mouse_timer == 0) {
mouse_timer = timer_read();
}
# endif /* #ifdef MK_KINETIC_SPEED */
# endif
# ifndef 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);
# else
mousekey_repeat = MOUSEKEY_MOVE_DELTA;
mousekey_wheel_repeat = MOUSEKEY_WHEEL_DELTA;
# endif
}
# endif // ifndef MOUSEKEY_INERTIA
# ifdef MOUSEKEY_INERTIA


Loading…
Cancel
Save