update scroll

This commit is contained in:
Chen Zeng 2025-03-03 16:25:01 +08:00
parent f6ce0064e5
commit ca81b1a18c
3 changed files with 17 additions and 18 deletions

View File

@ -41,7 +41,7 @@
compatible = "alps,ec11"; compatible = "alps,ec11";
a-gpios = <&gpio1 10 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; a-gpios = <&gpio1 10 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>;
b-gpios = <&gpio1 14 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; b-gpios = <&gpio1 14 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>;
steps = <40>; steps = <24>;
status = "disabled"; status = "disabled";
}; };

View File

@ -31,10 +31,10 @@ CONFIG_EC11=y
CONFIG_EC11_TRIGGER_GLOBAL_THREAD=y CONFIG_EC11_TRIGGER_GLOBAL_THREAD=y
# Mouse enable # Mouse enable
CONFIG_ZMK_MOUSE=y CONFIG_ZMK_POINTING=y
CONFIG_ZMK_BACKLIGHT=y CONFIG_ZMK_BACKLIGHT=y
CONFIG_ZMK_BACKLIGHT_BRT_START=100 CONFIG_ZMK_BACKLIGHT_BRT_START=100
CONFIG_ZMK_POINTING_SMOOTH_SCROLLING=y
# Uncomment the following line to increase the keyboard's wireless range # Uncomment the following line to increase the keyboard's wireless range
#CONFIG_BT_CTLR_TX_PWR_PLUS_8=y #CONFIG_BT_CTLR_TX_PWR_PLUS_8=y

View File

@ -1,32 +1,31 @@
#define ZMK_POINTING_DEFAULT_MOVE_VAL 1200 // 600 #define ZMK_POINTING_DEFAULT_MOVE_VAL 1200 // 600
#define ZMK_POINTING_DEFAULT_SCRL_VAL 35 // 10 #define ZMK_POINTING_DEFAULT_SCRL_VAL 25 // 10
#include <input/processors.dtsi> #include <input/processors.dtsi>
#include <zephyr/dt-bindings/input/input-event-codes.h>
#include <behaviors.dtsi> #include <behaviors.dtsi>
#include <dt-bindings/zmk/bt.h> #include <dt-bindings/zmk/bt.h>
#include <dt-bindings/zmk/keys.h>
#include <dt-bindings/zmk/outputs.h>
#include <dt-bindings/zmk/pointing.h>
#include <dt-bindings/zmk/ext_power.h> #include <dt-bindings/zmk/ext_power.h>
#include <dt-bindings/zmk/keys.h>
#include <dt-bindings/zmk/pointing.h>
#include <dt-bindings/zmk/pointing.h>
#include <dt-bindings/zmk/pointing.h>
#include <dt-bindings/zmk/rgb.h> #include <dt-bindings/zmk/rgb.h>
#include <zephyr/dt-bindings/input/input-event-codes.h>
&mmv_input_listener { &mmv_input_listener { input-processors = <&zip_xy_scaler 2 1>; };
input-processors = <&zip_xy_scaler 2 1>;
};
&msc_input_listener { &msc_input_listener { input-processors = <&zip_scroll_scaler 2 1>; };
input-processors = <&zip_scroll_scaler 2 1>;
};
&msc { &msc {
acceleration-exponent = <0>; // 0 acceleration-exponent = <1>; // 0
time-to-max-speed-ms = <0>; // 300 time-to-max-speed-ms = <100>; // 300
delay-ms = <0>; // 0 delay-ms = <0>; // 0
}; };
&mmv { &mmv {
time-to-max-speed-ms = <400>; time-to-max-speed-ms = <500>;
acceleration-exponent = <1>; acceleration-exponent = <1>;
trigger-period-ms = <16>;
}; };
@ -50,7 +49,7 @@
compatible = "zmk,behavior-sensor-rotate"; compatible = "zmk,behavior-sensor-rotate";
#sensor-binding-cells = <0>; #sensor-binding-cells = <0>;
bindings = <&msc SCRL_DOWN>, <&msc SCRL_UP>; bindings = <&msc SCRL_DOWN>, <&msc SCRL_UP>;
tap-ms = <30>; tap-ms = <100>;
}; };
keymap { keymap {