From 68622dbe5200e09f65554e1db07b5b1ba7afd3bd Mon Sep 17 00:00:00 2001 From: Chen Zeng Date: Fri, 6 Sep 2024 21:50:01 +0800 Subject: [PATCH] update --- build.yaml | 2 +- config/boards/arm/sofle/Kconfig.defconfig | 2 +- config/boards/arm/sofle/sofle.conf | 3 +- config/boards/arm/sofle/sofle_left_defconfig | 23 +++++------ config/boards/arm/sofle/sofle_right_defconfig | 24 ++++++------ config/sofle.conf | 1 - config/sofle.keymap | 38 +++++++++++++++++-- config/west.yml | 9 ++++- 8 files changed, 69 insertions(+), 33 deletions(-) diff --git a/build.yaml b/build.yaml index db7f24e..957ef47 100644 --- a/build.yaml +++ b/build.yaml @@ -7,5 +7,5 @@ include: shield: nice_view_adapter nice_view artifact-name: sofle_left_nice_view - board: sofle_right - shield: nice_view_adapter nice_view + shield: nice_view_adapter nice_view_custom artifact-name: sofle_right_nice_view diff --git a/config/boards/arm/sofle/Kconfig.defconfig b/config/boards/arm/sofle/Kconfig.defconfig index 2621c28..0aedee4 100644 --- a/config/boards/arm/sofle/Kconfig.defconfig +++ b/config/boards/arm/sofle/Kconfig.defconfig @@ -49,7 +49,7 @@ endchoice endif -if LVGL +if SSD1306 config LV_Z_VDB_SIZE default 64 diff --git a/config/boards/arm/sofle/sofle.conf b/config/boards/arm/sofle/sofle.conf index eb7d126..d30b9e3 100644 --- a/config/boards/arm/sofle/sofle.conf +++ b/config/boards/arm/sofle/sofle.conf @@ -8,7 +8,7 @@ CONFIG_ZMK_IDLE_SLEEP_TIMEOUT=3600000 # SPDX-License-Identifier: MIT # -CONFIG_ZMK_SLEEP=y +CONFIG_ZMK_SLEEP=n CONFIG_WS2812_STRIP=y CONFIG_ZMK_RGB_UNDERGLOW=y CONFIG_ZMK_RGB_UNDERGLOW_EXT_POWER=y @@ -21,3 +21,4 @@ CONFIG_ZMK_RGB_UNDERGLOW_HUE_START=160 CONFIG_ZMK_RGB_UNDERGLOW_EFF_START=3 #CONFIG_ZMK_HID_CONSUMER_REPORT_USAGES_BASIC=y +CONFIG_ZMK_MOUSE=y diff --git a/config/boards/arm/sofle/sofle_left_defconfig b/config/boards/arm/sofle/sofle_left_defconfig index 7056bbc..9f2795a 100644 --- a/config/boards/arm/sofle/sofle_left_defconfig +++ b/config/boards/arm/sofle/sofle_left_defconfig @@ -43,17 +43,17 @@ CONFIG_ZMK_DISPLAY=y -CONFIG_ZMK_DISPLAY_WORK_QUEUE_DEDICATED=y -CONFIG_ZMK_DISPLAY_DEDICATED_THREAD_STACK_SIZE=2048 -CONFIG_LV_Z_BITS_PER_PIXEL=1 -CONFIG_LV_COLOR_DEPTH_1=y -CONFIG_LV_DPI_DEF=145 -CONFIG_LV_Z_VDB_SIZE=100 -CONFIG_LV_USE_THEME_MONO=y -CONFIG_LV_COLOR_CHROMA_KEY_HEX=0x00FF00 -CONFIG_ZMK_LV_FONT_DEFAULT_SMALL_MONTSERRAT_16=y -CONFIG_LV_FONT_MONTSERRAT_26=y -CONFIG_LV_FONT_DEFAULT_MONTSERRAT_26=y +#CONFIG_ZMK_DISPLAY_WORK_QUEUE_DEDICATED=y +#CONFIG_ZMK_DISPLAY_DEDICATED_THREAD_STACK_SIZE=2048 +#CONFIG_LV_Z_BITS_PER_PIXEL=1 +#CONFIG_LV_COLOR_DEPTH_1=y +#CONFIG_LV_DPI_DEF=145 +#CONFIG_LV_Z_VDB_SIZE=100 +#CONFIG_LV_USE_THEME_MONO=y +#CONFIG_LV_COLOR_CHROMA_KEY_HEX=0x00FF00 +#CONFIG_ZMK_LV_FONT_DEFAULT_SMALL_MONTSERRAT_16=y +#CONFIG_LV_FONT_MONTSERRAT_26=y +#CONFIG_LV_FONT_DEFAULT_MONTSERRAT_26=y #EXT POWER @@ -75,3 +75,4 @@ CONFIG_ZMK_HID_REPORT_TYPE_NKRO=n #EC11 enable CONFIG_EC11=y CONFIG_EC11_TRIGGER_GLOBAL_THREAD=y +CONFIG_ZMK_MOUSE=y \ No newline at end of file diff --git a/config/boards/arm/sofle/sofle_right_defconfig b/config/boards/arm/sofle/sofle_right_defconfig index 4eb4fa7..0c65a74 100644 --- a/config/boards/arm/sofle/sofle_right_defconfig +++ b/config/boards/arm/sofle/sofle_right_defconfig @@ -44,17 +44,17 @@ CONFIG_ZMK_DISPLAY=y -CONFIG_ZMK_DISPLAY_WORK_QUEUE_DEDICATED=y -CONFIG_ZMK_DISPLAY_DEDICATED_THREAD_STACK_SIZE=2048 -CONFIG_LV_Z_BITS_PER_PIXEL=1 -CONFIG_LV_COLOR_DEPTH_1=y -CONFIG_LV_DPI_DEF=145 -CONFIG_LV_Z_VDB_SIZE=100 -CONFIG_LV_USE_THEME_MONO=y -CONFIG_LV_COLOR_CHROMA_KEY_HEX=0x00FF00 -CONFIG_ZMK_LV_FONT_DEFAULT_SMALL_MONTSERRAT_16=y -CONFIG_LV_FONT_MONTSERRAT_26=y -CONFIG_LV_FONT_DEFAULT_MONTSERRAT_26=y +#CONFIG_ZMK_DISPLAY_WORK_QUEUE_DEDICATED=y +#CONFIG_ZMK_DISPLAY_DEDICATED_THREAD_STACK_SIZE=2048 +#CONFIG_LV_Z_BITS_PER_PIXEL=1 +#CONFIG_LV_COLOR_DEPTH_1=y +#CONFIG_LV_DPI_DEF=145 +#CONFIG_LV_Z_VDB_SIZE=100 +#CONFIG_LV_USE_THEME_MONO=y +#CONFIG_LV_COLOR_CHROMA_KEY_HEX=0x00FF00 +#CONFIG_ZMK_LV_FONT_DEFAULT_SMALL_MONTSERRAT_16=y +#CONFIG_LV_FONT_MONTSERRAT_26=y +#CONFIG_LV_FONT_DEFAULT_MONTSERRAT_26=y #EXT POWER CONFIG_ZMK_EXT_POWER=y @@ -70,5 +70,5 @@ CONFIG_USB_DEVICE_MANUFACTURER="sofle" CONFIG_BT_CTLR_TX_PWR_PLUS_8=y CONFIG_ZMK_HID_REPORT_TYPE_NKRO=n - +CONFIG_ZMK_MOUSE=y diff --git a/config/sofle.conf b/config/sofle.conf index 2da6771..fe5dff6 100644 --- a/config/sofle.conf +++ b/config/sofle.conf @@ -8,7 +8,6 @@ CONFIG_ZMK_IDLE_SLEEP_TIMEOUT=3600000 # SPDX-License-Identifier: MIT # -CONFIG_ZMK_SLEEP=y CONFIG_WS2812_STRIP=y CONFIG_ZMK_RGB_UNDERGLOW=y CONFIG_ZMK_RGB_UNDERGLOW_EXT_POWER=n diff --git a/config/sofle.keymap b/config/sofle.keymap index b568b47..0000a54 100644 --- a/config/sofle.keymap +++ b/config/sofle.keymap @@ -1,3 +1,5 @@ +#define ZMK_MOUSE_DEFAULT_SCRL_VAL 35 // 10 +#include #include #include #include @@ -5,6 +7,18 @@ #include #include +&msc { + acceleration-exponent = <0>; // 0 + time-to-max-speed-ms = <0>; // 300 + delay-ms = <0>; // 0 +}; + + +&mmv { + time-to-max-speed-ms = <400>; + acceleration-exponent = <1>; +}; + / { macros { flash_macro: flash_macro { @@ -45,6 +59,20 @@ tapping-term-ms = <135>; quick-tap-ms = <0>; }; + + rgb_encoder: rgb_encoder { + compatible = "zmk,behavior-sensor-rotate"; + label = "RGB_ENCODER"; + #sensor-binding-cells = <0>; + bindings = <&rgb_ug RGB_BRI>, <&rgb_ug RGB_BRD>; + }; + + scroll_encoder: scroll_encoder { + compatible = "zmk,behavior-sensor-rotate"; + #sensor-binding-cells = <0>; + bindings = <&msc SCRL_UP>, <&msc SCRL_DOWN>; + tap-ms = <30>; + }; }; keymap { @@ -121,18 +149,20 @@ >; label = "Rgb"; + sensor-bindings = <&rgb_encoder &scroll_encoder>; }; Mouse { bindings = < -&trans &trans &trans &trans &trans &trans &kp UP_ARROW &trans &trans &trans &trans &trans &trans -&trans &trans &trans &trans &trans &trans &kp DOWN &trans &trans &kp UP &trans &trans &trans -&trans &trans &trans &trans &trans &trans &kp LEFT &trans &kp LEFT &kp DOWN &kp RIGHT &trans &trans -&trans &trans &trans &trans &trans &trans &kp RIGHT &trans &trans &trans &trans &trans &trans +&trans &trans &trans &trans &trans &trans &mmv MOVE_UP &trans &trans &trans &trans &trans &trans +&trans &trans &trans &trans &trans &trans &mmv MOVE_DOWN &trans &trans &mmv MOVE_UP &trans &trans &trans +&trans &trans &trans &trans &trans &trans &mmv MOVE_LEFT &trans &mmv MOVE_LEFT &mmv MOVE_DOWN &mmv MOVE_RIGHT &trans &trans +&trans &trans &trans &trans &trans &trans &mmv MOVE_RIGHT &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &mkp LCLK &mkp RCLK &to 0 &mkp LCLK &mkp RCLK &trans &trans &trans >; label = "Mouse"; + sensor-bindings = <&scroll_encoder>; }; }; diff --git a/config/west.yml b/config/west.yml index 379d291..dfc20f8 100644 --- a/config/west.yml +++ b/config/west.yml @@ -1,11 +1,16 @@ manifest: remotes: - name: zmkfirmware - url-base: https://github.com/zmkfirmware + url-base: https://github.com/petejohanson + - name: gpeye + url-base: https://github.com/GPeye projects: - name: zmk remote: zmkfirmware - revision: main + revision: feat/pointers-move-scroll import: app/west.yml + - name: urchin-peripheral-animation + remote: gpeye + revision: main self: path: config