From e6d67ac2285cca051e5091ee09ba895b2552e077 Mon Sep 17 00:00:00 2001 From: urob <978080+urob@users.noreply.github.com> Date: Sat, 4 Jan 2025 00:33:58 -0500 Subject: [PATCH] Add warp mode for mouse & scroll --- config/base.keymap | 9 ++++---- config/corneish_zen.conf | 2 +- config/glove80.conf | 2 +- config/mouse.dtsi | 44 +++++++++++++++++++++++++++++++++++----- config/planck_rev6.conf | 2 +- 5 files changed, 47 insertions(+), 12 deletions(-) diff --git a/config/base.keymap b/config/base.keymap index b9f948737..ac045c17f 100644 --- a/config/base.keymap +++ b/config/base.keymap @@ -120,10 +120,11 @@ ZMK_TAP_DANCE(num_dance, bindings = <&num_word NUM>, <&sl NUM>; tapping-term-ms = <200>;) // Smart-mouse, requires tri-state module. -ZMK_TRI_STATE(smart_mouse, bindings = <&tog MOUSE>, <&none>, <&tog MOUSE>; - ignored-key-positions = - ; - ignored-layers = ;) +ZMK_TRI_STATE( + smart_mouse, bindings = <&tog MOUSE>, <&none>, <&tog MOUSE>; + ignored-key-positions = + ; + ignored-layers = ;) /* Custom behaviors */ diff --git a/config/corneish_zen.conf b/config/corneish_zen.conf index a0816acb5..7a217e8d8 100644 --- a/config/corneish_zen.conf +++ b/config/corneish_zen.conf @@ -4,7 +4,7 @@ CONFIG_ZMK_IDLE_SLEEP_TIMEOUT=1800000 # Enable mouse CONFIG_ZMK_POINTING=y -CONFIG_ZMK_POINTING_SMOOTH_SCROLLING=y +# CONFIG_ZMK_POINTING_SMOOTH_SCROLLING=y # Combo config, automated by build script CONFIG_ZMK_COMBO_MAX_COMBOS_PER_KEY=6 diff --git a/config/glove80.conf b/config/glove80.conf index fa40b251b..74df1a380 100644 --- a/config/glove80.conf +++ b/config/glove80.conf @@ -4,7 +4,7 @@ CONFIG_ZMK_IDLE_SLEEP_TIMEOUT=1800000 # Enable mouse CONFIG_ZMK_POINTING=y -CONFIG_ZMK_POINTING_SMOOTH_SCROLLING=y +# CONFIG_ZMK_POINTING_SMOOTH_SCROLLING=y # Combo config, automated by build script CONFIG_ZMK_COMBO_MAX_COMBOS_PER_KEY=6 diff --git a/config/mouse.dtsi b/config/mouse.dtsi index 7b805fac4..e6d38f005 100644 --- a/config/mouse.dtsi +++ b/config/mouse.dtsi @@ -1,10 +1,12 @@ // Settings tuned for 3840 x 2160 display resolution -#define ZMK_POINTING_DEFAULT_MOVE_VAL 1500 // 600 -#define ZMK_POINTING_DEFAULT_SCRL_VAL 120 // 10 +#define ZMK_POINTING_DEFAULT_MOVE_VAL 600 // 600 +#define ZMK_POINTING_DEFAULT_SCRL_VAL 20 // 10 #include +#include +#include -// Config from @caksoylar, defaults in comments +// Based on @caksoylar's config, defaults in comments &mmv { acceleration-exponent = <1>; // 1 time-to-max-speed-ms = <500>; // 300 @@ -12,11 +14,43 @@ }; &msc { - acceleration-exponent = <1>; // 0 - time-to-max-speed-ms = <800>; // 300 + acceleration-exponent = <0>; // 0 + time-to-max-speed-ms = <300>; // 300 delay-ms = <0>; // 0 }; +&mmv_input_listener { + warp { + layers =