From 35d2a03111d84aaf27ade7779aa4a108851f2f81 Mon Sep 17 00:00:00 2001 From: Ryan McLean Date: Mon, 12 Jan 2026 16:20:29 +0000 Subject: [PATCH 01/10] Pin to v0.2.1 zmk --- config/west.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/west.yml b/config/west.yml index b4858f11..ad41496e 100644 --- a/config/west.yml +++ b/config/west.yml @@ -7,7 +7,7 @@ manifest: projects: - name: zmk remote: zmkfirmware - revision: main + revision: v0.2.1 import: app/west.yml - name: zmk-pmw3610-driver remote: DoctorWangWang From c756e78541c5d0006de3f4a2a4d052a7375cab8f Mon Sep 17 00:00:00 2001 From: Ryan McLean Date: Mon, 12 Jan 2026 16:27:03 +0000 Subject: [PATCH 02/10] Upgrade to ZMK v0.3 --- build.yaml | 10 +++++----- config/west.yml | 8 ++++---- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/build.yaml b/build.yaml index b714b9c9..bd6db237 100644 --- a/build.yaml +++ b/build.yaml @@ -4,20 +4,20 @@ # control, add individual board + shield combinations to # the `include` property, e.g: # -# board: [ "nice_nano_v2" ] +# board: [ "nice_nano" ] # shield: [ "corne_left", "corne_right" ] # include: # - board: bdn9_rev2 -# - board: nice_nano_v2 +# - board: nice_nano # shield: reviung41 # --- include: - - board: nice_nano_v2 + - board: nice_nano shield: cck_ball_left - - board: nice_nano_v2 + - board: nice_nano shield: cck_ball_right snippet: studio-rpc-usb-uart cmake-args: -DCONFIG_ZMK_STUDIO=y - - board: nice_nano_v2 + - board: nice_nano shield: settings_reset diff --git a/config/west.yml b/config/west.yml index ad41496e..d2920d0f 100644 --- a/config/west.yml +++ b/config/west.yml @@ -7,11 +7,11 @@ manifest: projects: - name: zmk remote: zmkfirmware - revision: v0.2.1 + revision: v0.3.0 import: app/west.yml - - name: zmk-pmw3610-driver - remote: DoctorWangWang - revision: main +# - name: zmk-pmw3610-driver +# remote: DoctorWangWang +# revision: main self: path: config From 71f372fb30cf00b1c45e85edfacca23fe96a763c Mon Sep 17 00:00:00 2001 From: Ryan McLean Date: Mon, 12 Jan 2026 16:40:26 +0000 Subject: [PATCH 03/10] Change pmw driver provider --- .../shields/cck_ball/cck_ball_right.conf | 33 ++++++++++--------- .../shields/cck_ball/cck_ball_right.overlay | 3 +- config/west.yml | 5 +++ 3 files changed, 25 insertions(+), 16 deletions(-) diff --git a/config/boards/shields/cck_ball/cck_ball_right.conf b/config/boards/shields/cck_ball/cck_ball_right.conf index 75b5ec79..8ddc803a 100644 --- a/config/boards/shields/cck_ball/cck_ball_right.conf +++ b/config/boards/shields/cck_ball/cck_ball_right.conf @@ -1,23 +1,26 @@ -CONFIG_SPI=y - CONFIG_SPI=y CONFIG_INPUT=y -CONFIG_ZMK_MOUSE=y -# CONFIG_ZMK_POINTING=y +# CONFIG_ZMK_MOUSE=y +CONFIG_ZMK_POINTING=y +CONFIG_ZMK_POINTING_DEVICE=y CONFIG_ZMK_EXT_POWER=y -CONFIG_PMW3610=y -CONFIG_PMW3610_CPI=1200 -CONFIG_PMW3610_CPI_DIVIDOR=4 -CONFIG_PMW3610_ORIENTATION_270=y -CONFIG_PMW3610_SNIPE_CPI=200 -CONFIG_PMW3610_SNIPE_CPI_DIVIDOR=1 -CONFIG_PMW3610_SCROLL_TICK=70 -CONFIG_PMW3610_INVERT_X=y - -CONFIG_PMW3610_POLLING_RATE_125_SW=y -CONFIG_PMW3610_SMART_ALGORITHM=y +#CONFIG_PMW3610=y +#CONFIG_PMW3610_CPI=1200 +#CONFIG_PMW3610_CPI_DIVIDOR=4 +#CONFIG_PMW3610_ORIENTATION_270=y +#CONFIG_PMW3610_SNIPE_CPI=200 +#CONFIG_PMW3610_SNIPE_CPI_DIVIDOR=1 +#CONFIG_PMW3610_SCROLL_TICK=70 +#CONFIG_PMW3610_INVERT_X=y + +#CONFIG_PMW3610_POLLING_RATE_125_SW=y +#CONFIG_PMW3610_SMART_ALGORITHM=y + + +CONFIG_PMW3610_ALT=y + # CONFIG_PMW3610_AUTOMOUSE_TIMEOUT_MS=250 diff --git a/config/boards/shields/cck_ball/cck_ball_right.overlay b/config/boards/shields/cck_ball/cck_ball_right.overlay index ca7273e8..dc1cf924 100644 --- a/config/boards/shields/cck_ball/cck_ball_right.overlay +++ b/config/boards/shields/cck_ball/cck_ball_right.overlay @@ -51,10 +51,11 @@ trackball: trackball@0 { status = "okay"; - compatible = "pixart,pmw3610"; + compatible = "pixart,pmw3610-alt"; reg = <0>; spi-max-frequency = <2000000>; irq-gpios = <&gpio0 6 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; + cpi = <1200>; scroll-layers = <3>; snipe-layers = <4>; // automouse-layer = <3>; diff --git a/config/west.yml b/config/west.yml index d2920d0f..a23040c0 100644 --- a/config/west.yml +++ b/config/west.yml @@ -4,11 +4,16 @@ manifest: url-base: https://github.com/zmkfirmware - name: DoctorWangWang url-base: https://github.com/DoctorWangWang + - name: badjeff + url-base: https://github.com/badjeff projects: - name: zmk remote: zmkfirmware revision: v0.3.0 import: app/west.yml + - name: zmk-pmw3610-driver + remote: badjeff + revision: main # - name: zmk-pmw3610-driver # remote: DoctorWangWang # revision: main From 65b3fb760b4bacb62f1e20008d441078e89e14f5 Mon Sep 17 00:00:00 2001 From: Ryan McLean Date: Mon, 12 Jan 2026 16:49:11 +0000 Subject: [PATCH 04/10] Add evt types --- config/boards/shields/cck_ball/cck_ball_right.overlay | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/config/boards/shields/cck_ball/cck_ball_right.overlay b/config/boards/shields/cck_ball/cck_ball_right.overlay index dc1cf924..09f354c8 100644 --- a/config/boards/shields/cck_ball/cck_ball_right.overlay +++ b/config/boards/shields/cck_ball/cck_ball_right.overlay @@ -5,6 +5,7 @@ */ #include "cck_ball.dtsi" +#include &default_transform { col-offset = <6>; @@ -58,6 +59,9 @@ cpi = <1200>; scroll-layers = <3>; snipe-layers = <4>; + evt-type = ; + x-input-code = ; + y-input-code = ; // automouse-layer = <3>; }; }; From f3fe1d1947be8e50a783c6ba4899d5ba2234f0db Mon Sep 17 00:00:00 2001 From: Ryan McLean Date: Mon, 12 Jan 2026 16:53:32 +0000 Subject: [PATCH 05/10] Clean --- config/boards/shields/cck_ball/cck_ball_right.overlay | 2 -- 1 file changed, 2 deletions(-) diff --git a/config/boards/shields/cck_ball/cck_ball_right.overlay b/config/boards/shields/cck_ball/cck_ball_right.overlay index 09f354c8..6c465912 100644 --- a/config/boards/shields/cck_ball/cck_ball_right.overlay +++ b/config/boards/shields/cck_ball/cck_ball_right.overlay @@ -57,8 +57,6 @@ spi-max-frequency = <2000000>; irq-gpios = <&gpio0 6 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; cpi = <1200>; - scroll-layers = <3>; - snipe-layers = <4>; evt-type = ; x-input-code = ; y-input-code = ; From 58a77f46e9f4bdccc1febc7966008c8b11f8f900 Mon Sep 17 00:00:00 2001 From: Ryan McLean Date: Mon, 12 Jan 2026 16:58:03 +0000 Subject: [PATCH 06/10] Remove pnt dev --- config/boards/shields/cck_ball/cck_ball_right.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/boards/shields/cck_ball/cck_ball_right.conf b/config/boards/shields/cck_ball/cck_ball_right.conf index 8ddc803a..42606f17 100644 --- a/config/boards/shields/cck_ball/cck_ball_right.conf +++ b/config/boards/shields/cck_ball/cck_ball_right.conf @@ -2,7 +2,7 @@ CONFIG_SPI=y CONFIG_INPUT=y # CONFIG_ZMK_MOUSE=y CONFIG_ZMK_POINTING=y -CONFIG_ZMK_POINTING_DEVICE=y +#CONFIG_ZMK_POINTING_DEVICE=y CONFIG_ZMK_EXT_POWER=y From 3e05164fb6683c5248a06a70cc0ade3a9d5116f0 Mon Sep 17 00:00:00 2001 From: Ryan McLean Date: Tue, 10 Feb 2026 11:26:56 +0000 Subject: [PATCH 07/10] Update workflow for zmk 0.3 --- .github/workflows/build.yml | 76 ++++++++++++++++++++++++++++++++++++- 1 file changed, 74 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index d74fb89f..15941d3f 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,5 +1,77 @@ -on: [push, pull_request, workflow_dispatch] +on: + push: + branches: + - zmk_v0.3 + tags: + - "*-zmk_*" + pull_request: + workflow_dispatch: jobs: build: - uses: zmkfirmware/zmk/.github/workflows/build-user-config.yml@main + uses: zmkfirmware/zmk/.github/workflows/build-user-config.yml@v0.3.0 + + release: + runs-on: ubuntu-latest + needs: build + if: startsWith(github.ref, 'refs/tags/') && contains(github.ref, '-zmk_') + permissions: + contents: write + steps: + - name: Extract version info + id: version + run: | + # Extract tag name (e.g., "1.0.0-zmk_0.2.1") + TAG=${GITHUB_REF#refs/tags/} + echo "tag=$TAG" >> $GITHUB_OUTPUT + + # Extract ZMK version (everything after "-zmk_") + ZMK_VERSION=${TAG##*-zmk_} + echo "zmk_version=$ZMK_VERSION" >> $GITHUB_OUTPUT + + # Extract release version (everything before "-zmk_") + RELEASE_VERSION=${TAG%%-zmk_*} + echo "release_version=$RELEASE_VERSION" >> $GITHUB_OUTPUT + + - name: Download firmware artifacts + uses: actions/download-artifact@v4 + with: + name: firmware + path: firmware + + - name: Rename firmware files with ZMK version + run: | + mkdir firmware-release + cd firmware + for file in *; do + # Get file extension + ext="${file##*.}" + # Get filename without extension + name="${file%.*}" + # Rename with ZMK version postfix + cp "$file" "../firmware-release/${name}-zmk_${{ steps.version.outputs.zmk_version }}.${ext}" + done + cd .. + ls -lah firmware-release/ + + - name: Create Release + uses: softprops/action-gh-release@v1 + with: + files: firmware-release/* + name: Release ${{ steps.version.outputs.tag }} + body: | + ## CCK-BALL Firmware Release ${{ steps.version.outputs.release_version }} + + **ZMK Version:** ${{ steps.version.outputs.zmk_version }} + + ### Installation + 1. Download the appropriate `.uf2` file for your keyboard + 2. Put your keyboard into bootloader mode + 3. Copy the `.uf2` file to the mounted drive + 4. The keyboard will automatically reboot with the new firmware + + --- + generate_release_notes: true + append_body: true + draft: false + prerelease: false From 559794868e82062bbcb35d2db371d9ef1c77920a Mon Sep 17 00:00:00 2001 From: Ryan McLean Date: Tue, 10 Feb 2026 14:53:21 +0000 Subject: [PATCH 08/10] Update the Config and local builds (#3) * Untested: tweaks to layouts to align with v0.2.1. only real changes should be the builds (different driver / zmk 0.3) * Add settings reset and name change --- .gitignore | 11 ++ Makefile | 130 ++++++++++++++++++ .../shields/cck_ball/cck_ball-layouts.dtsi | 30 ++-- config/boards/shields/cck_ball/cck_ball.dtsi | 10 +- config/cck_ball.keymap | 121 ++++++++++++---- 5 files changed, 252 insertions(+), 50 deletions(-) create mode 100644 .gitignore create mode 100644 Makefile diff --git a/.gitignore b/.gitignore new file mode 100644 index 00000000..265ea439 --- /dev/null +++ b/.gitignore @@ -0,0 +1,11 @@ +# Build artifacts +build/ +*.uf2 + +# ZMK workspace (only needed for native builds, not Docker) +modules/ +tools/ +zephyr/ +bootloader/ +zmk/ +.west/ diff --git a/Makefile b/Makefile new file mode 100644 index 00000000..b4ad7cce --- /dev/null +++ b/Makefile @@ -0,0 +1,130 @@ +# CCK-BALL ZMK Firmware Build Makefile + +# Configuration +BOARD := nice_nano +ZMK_CONFIG := /work/config +BUILD_DIR := build +OUTPUT_DIR := /work + +# Snippet for ZMK Studio support (right side only) +STUDIO_SNIPPET := studio-rpc-usb-uart + +# Docker configuration +DOCKER_IMAGE := zmkfirmware/zmk-build-arm:stable +DOCKER_CMD := docker run --rm -w /work -v $(CURDIR):/work $(DOCKER_IMAGE) + +.PHONY: all setup init update left right clean help settings-reset +.PHONY: docker-all docker-setup docker-left docker-right docker-clean docker-settings-reset + +# Default target: build both halves +all: left right + +# Full setup (init + update + export) +setup: init update export + +# Initialize west workspace +init: + west init -l config + +# Update west modules +update: + west update + +# Export Zephyr +export: + west zephyr-export + +# Install development dependencies (requires root) +deps: + apt update && apt install -y vim + +# Build left half (peripheral) +left: + west zephyr-export + west build -p always -s zmk/app -b $(BOARD) -- \ + -DZMK_CONFIG=$(ZMK_CONFIG) \ + -DSHIELD=cck_ball_left + cp $(BUILD_DIR)/zephyr/zmk.uf2 $(OUTPUT_DIR)/zmk_cck_ball_left.uf2 + @echo "✓ Left half built: $(OUTPUT_DIR)/zmk_cck_ball_left.uf2" + +# Build right half (central - with ZMK Studio support) +right: + west zephyr-export + west build -p always -s zmk/app -b $(BOARD) -S $(STUDIO_SNIPPET) -- \ + -DZMK_CONFIG=$(ZMK_CONFIG) \ + -DSHIELD=cck_ball_right \ + -DCONFIG_ZMK_STUDIO=y + cp $(BUILD_DIR)/zephyr/zmk.uf2 $(OUTPUT_DIR)/zmk_cck_ball_right.uf2 + @echo "✓ Right half built: $(OUTPUT_DIR)/zmk_cck_ball_right.uf2" + +# Clean build directory +clean: + rm -rf $(BUILD_DIR) + @echo "✓ Build directory cleaned" + +# Build settings reset firmware (both halves) +settings-reset: + west zephyr-export + west build -p always -s zmk/app -b $(BOARD) -- \ + -DZMK_CONFIG=$(ZMK_CONFIG) \ + -DSHIELD="settings_reset" + cp $(BUILD_DIR)/zephyr/zmk.uf2 $(OUTPUT_DIR)/settings_reset.uf2 + @echo "✓ Settings reset built: $(OUTPUT_DIR)/settings_reset.uf2" + +# ============================================ +# Docker Build Targets +# ============================================ + +# Docker: Build both halves +docker-all: + $(DOCKER_CMD) make all + +# Docker: Setup workspace +docker-setup: + $(DOCKER_CMD) make setup + +# Docker: Build left half +docker-left: + $(DOCKER_CMD) make left + +# Docker: Build right half +docker-right: + $(DOCKER_CMD) make right + +# Docker: Clean build +docker-clean: + $(DOCKER_CMD) make clean + +# Docker: Build settings reset +docker-settings-reset: + $(DOCKER_CMD) make settings-reset + +# Help +help: + @echo "CCK-BALL ZMK Firmware Build" + @echo "" + @echo "=== Docker Builds (Recommended) ===" + @echo "Usage: make docker-[target]" + @echo "" + @echo " docker-all - Build both halves using Docker" + @echo " docker-setup - Initialize workspace using Docker" + @echo " docker-left - Build left half using Docker" + @echo " docker-right - Build right half using Docker (with ZMK Studio)" + @echo " docker-settings-reset - Build settings reset using Docker" + @echo " docker-clean - Clean build directory using Docker" + @echo "" + @echo "=== Native Builds (requires west installed) ===" + @echo "Usage: make [target]" + @echo "" + @echo " all - Build both left and right halves (default)" + @echo " setup - Initialize workspace (init + update + export)" + @echo " init - Initialize west workspace" + @echo " update - Update west modules" + @echo " export - Export Zephyr" + @echo " deps - Install development dependencies" + @echo " left - Build left half only" + @echo " right - Build right half only (with ZMK Studio)" + @echo " settings-reset - Build settings reset firmware" + @echo " clean - Clean build directory" + @echo " help - Show this help message" + diff --git a/config/boards/shields/cck_ball/cck_ball-layouts.dtsi b/config/boards/shields/cck_ball/cck_ball-layouts.dtsi index ffc24dbf..d51059e6 100644 --- a/config/boards/shields/cck_ball/cck_ball-layouts.dtsi +++ b/config/boards/shields/cck_ball/cck_ball-layouts.dtsi @@ -3,7 +3,7 @@ / { cck_ball_layouts: cck_ball_layouts { compatible = "zmk,physical-layout"; - display-name = "CCK BALL Wireless"; + display-name = "Default"; transform = <&default_transform>; keys // w h x y rot rx ry = <&key_physical_attrs 100 100 0 38 0 0 0> @@ -44,28 +44,16 @@ , <&key_physical_attrs 100 100 1700 238 0 0 0> , <&key_physical_attrs 100 100 0 338 0 0 0> , <&key_physical_attrs 100 100 100 338 0 0 0> - , <&key_physical_attrs 100 100 200 313 0 0 0> - , <&key_physical_attrs 100 100 300 300 0 0 0> - , <&key_physical_attrs 100 100 400 313 0 0 0> - , <&key_physical_attrs 100 100 500 325 0 0 0> - , <&key_physical_attrs 100 100 1200 325 0 0 0> - , <&key_physical_attrs 100 100 1300 313 0 0 0> - , <&key_physical_attrs 100 100 1400 300 0 0 0> - , <&key_physical_attrs 100 100 1500 313 0 0 0> + , <&key_physical_attrs 100 100 200 338 0 0 0> + , <&key_physical_attrs 100 100 500 338 0 0 0> + , <&key_physical_attrs 100 100 600 363 0 0 0> + , <&key_physical_attrs 100 100 700 388 0 0 0> + , <&key_physical_attrs 100 100 1000 388 0 0 0> + , <&key_physical_attrs 100 100 1100 363 0 0 0> + , <&key_physical_attrs 100 100 1200 338 0 0 0> + , <&key_physical_attrs 100 100 1500 338 0 0 0> , <&key_physical_attrs 100 100 1600 338 0 0 0> , <&key_physical_attrs 100 100 1700 338 0 0 0> - , <&key_physical_attrs 100 100 0 438 0 0 0> - , <&key_physical_attrs 100 100 100 438 0 0 0> - , <&key_physical_attrs 100 100 200 438 0 0 0> - , <&key_physical_attrs 100 100 500 438 0 0 0> - , <&key_physical_attrs 100 100 600 463 0 0 0> - , <&key_physical_attrs 100 100 700 488 0 0 0> - , <&key_physical_attrs 100 100 1000 488 0 0 0> - , <&key_physical_attrs 100 100 1100 463 0 0 0> - , <&key_physical_attrs 100 100 1200 438 0 0 0> - , <&key_physical_attrs 100 100 1500 438 0 0 0> - , <&key_physical_attrs 100 100 1600 438 0 0 0> - , <&key_physical_attrs 100 100 1700 438 0 0 0> ; }; }; diff --git a/config/boards/shields/cck_ball/cck_ball.dtsi b/config/boards/shields/cck_ball/cck_ball.dtsi index 68c14178..8b69b8e4 100644 --- a/config/boards/shields/cck_ball/cck_ball.dtsi +++ b/config/boards/shields/cck_ball/cck_ball.dtsi @@ -11,14 +11,13 @@ default_transform: keymap_transform_0 { compatible = "zmk,matrix-transform"; columns = <12>; - rows = <5>; + rows = <4>; map = < RC(0,5) RC(0,4) RC(0,3) RC(0,2) RC(0,1) RC(0,0) RC(0,6) RC(0,7) RC(0,8) RC(0,9) RC(0,10) RC(0,11) RC(1,5) RC(1,4) RC(1,3) RC(1,2) RC(1,1) RC(1,0) RC(1,6) RC(1,7) RC(1,8) RC(1,9) RC(1,10) RC(1,11) RC(2,5) RC(2,4) RC(2,3) RC(2,2) RC(2,1) RC(2,0) RC(2,6) RC(2,7) RC(2,8) RC(2,9) RC(2,10) RC(2,11) - RC(3,5) RC(3,4) RC(3,3) RC(3,2) RC(3,1) RC(3,0) RC(3,6) RC(3,7) RC(3,8) RC(3,9) RC(3,10) RC(3,11) - RC(4,5) RC(4,4) RC(4,3) RC(4,2) RC(4,1) RC(4,0) RC(4,6) RC(4,7) RC(4,8) RC(4,9) RC(4,10) RC(4,11) + RC(3,5) RC(3,4) RC(3,3) RC(3,2) RC(3,1) RC(3,0) RC(3,6) RC(3,7) RC(3,8) RC(3,9) RC(3,10) RC(3,11) >; }; @@ -30,8 +29,7 @@ diode-direction = "col2row"; row-gpios - = <&gpio0 11 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> - , <&gpio1 0 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + = <&gpio1 0 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> , <&gpio0 24 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> , <&gpio0 22 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> , <&gpio1 13 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> @@ -60,7 +58,7 @@ sensors { compatible = "zmk,keymap-sensors"; sensors = <&left_encoder &right_encoder>; - triggers-per-rotation = <10>; + triggers-per-rotation = <24>; }; }; diff --git a/config/cck_ball.keymap b/config/cck_ball.keymap index 1aa68d84..5c262f4f 100644 --- a/config/cck_ball.keymap +++ b/config/cck_ball.keymap @@ -27,7 +27,7 @@ &soft_off { hold-time-ms = <2000>; }; / { - // 上下滚动编码器行为 + // Vertical scroll encoder behavior scroll_vertical_encoder: scroll_vertical_encoder { compatible = "zmk,behavior-sensor-rotate"; #sensor-binding-cells = <0>; @@ -35,7 +35,7 @@ tap-ms = <100>; }; - // 左右滚动编码器行为 + // Horizontal scroll encoder behavior scroll_horizontal_encoder: scroll_horizontal_encoder { compatible = "zmk,behavior-sensor-rotate"; #sensor-binding-cells = <0>; @@ -44,30 +44,108 @@ }; behaviors { + td_colon: td_colon { + compatible = "zmk,behavior-tap-dance"; + #binding-cells = <0>; + tapping-term-ms = <200>; + bindings = <&kp SEMI>, <&kp COLON>; + + }; + td_quote: td_quote { + compatible = "zmk,behavior-tap-dance"; + #binding-cells = <0>; + tapping-term-ms = <200>; + bindings = <&kp SQT>, <&kp DQT>, <&kp AT>; + + }; + paranthesis_dance: paranthesis_dance { + compatible = "zmk,behavior-tap-dance"; + #binding-cells = <0>; + tapping-term-ms = <200>; + bindings = <&ocpar>, <&kp LPAR>, <&kp RPAR>; + }; + curl_dance: curl_dance { + compatible = "zmk,behavior-tap-dance"; + #binding-cells = <0>; + tapping-term-ms = <200>; + bindings = <&occurl>, <&kp LBRC>, <&kp RBRC>; + }; + squ_dance: squ_dance { + compatible = "zmk,behavior-tap-dance"; + #binding-cells = <0>; + tapping-term-ms = <200>; + bindings = <&ocsqu>, <&kp LBKT>, <&kp RBKT>; + }; + ang_dance: ang_dance { + compatible = "zmk,behavior-tap-dance"; + #binding-cells = <0>; + tapping-term-ms = <200>; + bindings = <&ocang>, <&kp LT>, <&kp GT>; + }; }; + macros { + ocpar: ocpar { + compatible = "zmk,behavior-macro"; + #binding-cells = <0>; + bindings + = <¯o_tap &kp LPAR &kp RPAR &kp LEFT_ARROW> + ; + }; + occurl: occurl { + compatible = "zmk,behavior-macro"; + #binding-cells = <0>; + bindings + = <¯o_tap &kp LBRC &kp RBRC &kp LEFT_ARROW> + ; + }; + ocsqu: ocsqu { + compatible = "zmk,behavior-macro"; + #binding-cells = <0>; + bindings + = <¯o_tap &kp LBKT &kp RBKT &kp LEFT_ARROW> + ; + }; + ocang: ocang { + compatible = "zmk,behavior-macro"; + #binding-cells = <0>; + bindings + = <¯o_tap &kp LT &kp GT &kp LEFT_ARROW> + ; + }; + }; + keymap { compatible = "zmk,keymap"; QWERTY { bindings = < -&kp ESC &kp N1 &kp N2 &kp N3 &kp N4 &kp N5 &kp N6 &kp N7 &kp N8 &kp N9 &kp N0 &kp BACKSPACE -&kp TAB &kp Q &kp W &kp E &kp R &kp T &kp Y &kp U &kp I &kp O &kp P &kp BSLH -&kp CAPSLOCK &kp A < 4 S &kp D < 3 F &kp G &kp H &kp J &kp K &kp L &kp SEMI &kp SQT -&kp LEFT_SHIFT &kp Z &kp X &kp C &kp V &kp B &kp N &kp M &kp COMMA &kp DOT &kp UP_ARROW &kp FSLH -&kp LEFT_CONTROL &kp LEFT_WIN &kp LEFT_ALT &kp DELETE &kp SPACE &mo 1 &mo 2 &kp SPACE &kp ENTER &kp LEFT_ARROW &kp DOWN_ARROW &kp RIGHT_ARROW +&kp TAB &kp Q &kp W &kp E &kp R &kp T &kp Y &kp U &kp I &kp O &kp P &kp BSPC +&kp ESC &kp A &kp S &kp D &kp F &kp G &kp H &kp J &kp K &kp L &td_colon &td_quote +&kp LSHIFT &kp Z &kp X &kp C &kp V &kp B &kp N &kp M &kp COMMA &kp DOT &kp UP_ARROW &kp FSLH +&kp LCTRL &kp LWIN &kp LALT &kp NON_US_BSLH &kp SPACE &mo 1 &mo 2 &kp SPACE &kp ENTER &kp LEFT_ARROW &kp DOWN_ARROW &kp RIGHT_ARROW >; - sensor-bindings = <&inc_dec_kp C_VOL_UP C_VOL_DN &inc_dec_kp PG_UP PG_DN>; + sensor-bindings = <&inc_dec_kp C_VOL_UP C_VOL_DN &scroll_vertical_encoder>; + }; + + SYM_layers { + bindings = < +&kp GRAVE &kp INS &kp PG_UP &kp HOME &ang_dance &none ¶nthesis_dance &kp N7 &kp N8 &kp N9 &none &trans +&none &kp DEL &kp PG_DN &kp END &squ_dance &curl_dance &kp EQUAL &kp N4 &kp N5 &kp N6 &kp STAR &none +&kp LSHIFT &kp PSCRN &kp C_AL_LOCK &kp LC(LA(DEL)) &mo 3 &none &kp MINUS &kp N1 &kp N2 &kp N3 &kp FSLH &none +&kp LCTRL &kp LGUI &kp LALT &kp NON_US_HASH &none &none &mkp LCLK &mkp RCLK &none &kp N0 &kp DOT &kp K_CMENU + >; + + sensor-bindings = <&inc_dec_kp C_VOL_UP C_VOL_DN &scroll_horizontal_encoder>; }; - F_layers { + FKP_layers { bindings = < -&kp F12 &kp F1 &kp F2 &kp F3 &kp F4 &kp F5 &kp F6 &kp F7 &kp F8 &kp F9 &kp F10 &kp F11 -&kp A &none &none &none &none &trans &none &none &none &trans &trans &trans -&trans &none &none &none &none &trans &mkp LCLK &mkp RCLK &trans &trans &trans &trans -&trans &trans &trans &trans &trans &none &none &none &trans &trans &none &trans -&trans &trans &trans &trans &trans &trans &mkp LCLK &mkp RCLK &trans &trans &trans &trans +&kp SYSREQ &kp F9 &kp F10 &kp F11 &kp F12 &none &kp KP_NUM &kp KP_N7 &kp KP_N8 &kp KP_N9 &kp KP_MULTIPLY &none +&none &kp F5 &kp F6 &kp F7 &kp F8 &none &none &kp KP_N4 &kp KP_N5 &kp KP_N6 &kp KP_SLASH &none +&none &kp F1 &kp F2 &kp F3 &kp F4 &none &none &kp KP_N1 &kp KP_N2 &kp KP_N3 &kp KP_PLUS &kp KP_ENTER +&trans &trans &trans &none &none &none &none &none &kp KP_N0 &kp KP_DOT &kp KP_MINUS &none >; sensor-bindings = <&inc_dec_kp C_VOL_UP C_VOL_DN &inc_dec_kp PG_UP PG_DN>; @@ -75,11 +153,10 @@ BT_layers { bindings = < -&trans &bt BT_SEL 0 &bt BT_SEL 1 &bt BT_SEL 2 &bt BT_SEL 3 &bt BT_SEL 4 &trans &trans &trans &trans &trans &kp W -&trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans -&trans &bt BT_CLR_ALL &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans -&trans &trans &trans &bt BT_CLR &trans &trans &bt BT_NXT &trans &trans &trans &trans &trans -&trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans +&bootloader &none &none &none &none &none &bt BT_SEL 0 &bt BT_SEL 1 &bt BT_SEL 2 &bt BT_SEL 3 &bt BT_SEL 4 &bt BT_SEL 5 +&none &bt BT_CLR_ALL &bt BT_CLR &none &none &bt BT_PRV &none &none &none &none &none &none +&none &none &none &none &none &bt BT_NXT &none &none &none &none &none &none +&none &none &none &none &none &none &none &none &none &none &none &bootloader >; sensor-bindings = <&inc_dec_kp C_VOL_UP C_VOL_DN &inc_dec_kp PG_UP PG_DN>; @@ -90,7 +167,6 @@ &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans -&trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans >; @@ -102,12 +178,11 @@ &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans -&trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans >; - sensor-bindings = <&scroll_vertical_encoder>, // 编码器1:上下滚动 - <&scroll_horizontal_encoder>; // 编码器2:左右滚动 + sensor-bindings = <&scroll_vertical_encoder>, // Encoder 1: vertical scroll + <&scroll_horizontal_encoder>; // Encoder 2: horizontal scroll }; }; }; From aa426d930d2d94a62672be959b0c5e51b22b5f68 Mon Sep 17 00:00:00 2001 From: Ryan McLean Date: Tue, 10 Feb 2026 14:57:49 +0000 Subject: [PATCH 09/10] Update build.yml --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 15941d3f..16b41ab5 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,7 +1,7 @@ on: push: branches: - - zmk_v0.3 + - main-zmk_0.3 tags: - "*-zmk_*" pull_request: From 8ca31ccfa4944542af8eed80ec30456901a57869 Mon Sep 17 00:00:00 2001 From: Ryan McLean Date: Mon, 16 Feb 2026 19:58:45 +0000 Subject: [PATCH 10/10] Attempt to fix inverted trackerball (#4) * Fixes the Trackerball * Ups the scroll sensitivity still a bit laggy --- config/boards/shields/cck_ball/cck_ball.dtsi | 4 ++-- config/boards/shields/cck_ball/cck_ball_right.overlay | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/config/boards/shields/cck_ball/cck_ball.dtsi b/config/boards/shields/cck_ball/cck_ball.dtsi index 8b69b8e4..c8368639 100644 --- a/config/boards/shields/cck_ball/cck_ball.dtsi +++ b/config/boards/shields/cck_ball/cck_ball.dtsi @@ -43,7 +43,7 @@ label = "LEFT_ENCODER"; a-gpios = <&gpio0 29 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; b-gpios = <&gpio0 2 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; - steps = <12>; + steps = <72>; }; right_encoder: encoder_right { @@ -52,7 +52,7 @@ label = "RIGHT_ENCODER"; a-gpios = <&gpio0 29 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; b-gpios = <&gpio0 2 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; - steps = <12>; + steps = <72>; }; sensors { diff --git a/config/boards/shields/cck_ball/cck_ball_right.overlay b/config/boards/shields/cck_ball/cck_ball_right.overlay index 6c465912..63d64149 100644 --- a/config/boards/shields/cck_ball/cck_ball_right.overlay +++ b/config/boards/shields/cck_ball/cck_ball_right.overlay @@ -60,6 +60,8 @@ evt-type = ; x-input-code = ; y-input-code = ; + swap-xy; + //invert-y; // automouse-layer = <3>; }; };