summaryrefslogtreecommitdiffstats
path: root/quantum/mousekey.h
diff options
context:
space:
mode:
authorNick Brassel <nick@tzarc.org>2022-11-28 07:54:00 +1100
committerNick Brassel <nick@tzarc.org>2022-11-28 07:54:00 +1100
commit4020674163fc80914059c4c9c3be5c0ae00bd150 (patch)
tree6f4187d72b04d03572adf507502afbda9726d696 /quantum/mousekey.h
parent8f9b49dc5b05fd3421e47aa76822a5b2199dfca6 (diff)
parent9e78e65a566487b2f4fe7b663971a01deb6ddad2 (diff)
Merge remote-tracking branch 'upstream/develop'
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