summaryrefslogtreecommitdiff
path: root/quantum/mousekey.h
diff options
context:
space:
mode:
Diffstat (limited to 'quantum/mousekey.h')
-rw-r--r--quantum/mousekey.h39
1 files changed, 28 insertions, 11 deletions
diff --git a/quantum/mousekey.h b/quantum/mousekey.h
index da2edb481a..e968e000c0 100644
--- a/quantum/mousekey.h
+++ b/quantum/mousekey.h
@@ -36,34 +36,48 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
# endif
# ifndef MOUSEKEY_MOVE_DELTA
-# ifndef MK_KINETIC_SPEED
-# define MOUSEKEY_MOVE_DELTA 8
-# else
+# if defined(MK_KINETIC_SPEED)
# define MOUSEKEY_MOVE_DELTA 16
+# elif defined(MOUSEKEY_INERTIA)
+# define MOUSEKEY_MOVE_DELTA 1
+# else
+# define MOUSEKEY_MOVE_DELTA 8
# endif
# endif
# ifndef MOUSEKEY_WHEEL_DELTA
# define MOUSEKEY_WHEEL_DELTA 1
# endif
# ifndef MOUSEKEY_DELAY
-# ifndef MK_KINETIC_SPEED
-# define MOUSEKEY_DELAY 10
-# else
+# if defined(MK_KINETIC_SPEED)
# define MOUSEKEY_DELAY 5
+# elif defined(MOUSEKEY_INERTIA)
+# define MOUSEKEY_DELAY 150 // allow single-pixel movements before repeat activates
+# else
+# define MOUSEKEY_DELAY 10
# endif
# endif
# ifndef MOUSEKEY_INTERVAL
-# ifndef MK_KINETIC_SPEED
-# define MOUSEKEY_INTERVAL 20
-# else
+# if defined(MK_KINETIC_SPEED)
# define MOUSEKEY_INTERVAL 10
+# elif defined(MOUSEKEY_INERTIA)
+# define MOUSEKEY_INTERVAL 16 // 60 fps
+# else
+# define MOUSEKEY_INTERVAL 20
# endif
# endif
# ifndef MOUSEKEY_MAX_SPEED
-# define MOUSEKEY_MAX_SPEED 10
+# if defined(MOUSEKEY_INERTIA)
+# define MOUSEKEY_MAX_SPEED 32
+# else
+# define MOUSEKEY_MAX_SPEED 10
+# endif
# endif
# ifndef MOUSEKEY_TIME_TO_MAX
-# define MOUSEKEY_TIME_TO_MAX 30
+# if defined(MOUSEKEY_INERTIA)
+# define MOUSEKEY_TIME_TO_MAX 32
+# else
+# define MOUSEKEY_TIME_TO_MAX 30
+# endif
# endif
# ifndef MOUSEKEY_WHEEL_DELAY
# define MOUSEKEY_WHEEL_DELAY 10
@@ -78,6 +92,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
# define MOUSEKEY_WHEEL_TIME_TO_MAX 40
# endif
+# ifndef MOUSEKEY_FRICTION
+# define MOUSEKEY_FRICTION 24 // 0 to 255
+# endif
# ifndef MOUSEKEY_INITIAL_SPEED
# define MOUSEKEY_INITIAL_SPEED 100
# endif