Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
67 changes: 1 addition & 66 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,69 +9,4 @@ on:

jobs:
build:
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
uses: zmkfirmware/zmk/.github/workflows/build-user-config.yml@v0.1
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
zmk-config for CCK_BALL (4x6)
![白色成品+手托](https://github.com/user-attachments/assets/7b2834f0-ca09-4f8c-9fc1-12455f67ae44)
![白色成品2](https://github.com/user-attachments/assets/7fe073d5-bb1c-4e42-b150-3521b4418ae0)
![黑色成品1](https://github.com/user-attachments/assets/4a7023ca-07ca-4a63-9d32-9af96ff9c73f)
![黑色成品2](https://github.com/user-attachments/assets/34d4351d-cbd9-4c82-a2e0-c7c9d28c5942)

i18L'ed config
Enter key swapped with SQT
Right roller switch to MB4 MB5 emulation
20 changes: 10 additions & 10 deletions config/cck_ball.conf
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
# 设置自动连接最小间隔时间为7.5ms
# Set the minimum automatic connection interval to 7.5ms.
# CONFIG_BT_PERIPHERAL_PREF_MIN_INT=6

# 11.25ms的副手链接主手的时间间隔
# The time interval between the secondary hand and the primary hand is 11.25ms.
# CONFIG_BT_PERIPHERAL_PREF_MAX_INT=9

# 延迟为0,意味着副手不会跳过任何链接事键,始终保持活跃监听状态,能解决因为睡眠太深而无法被主手唤醒的问题,稍微增加副手的功耗
# A latency of 0 means the secondary device will not skip any connection events and will always remain actively listening. This solves the problem of the primary device being unable to wake it up due to deep sleep, although it slightly increases the power consumption of the secondary device.
# CONFIG_BT_PERIPHERAL_PREF_LATENCY=0

# 超过4000ms,在这个时间段内没有通信,链接才会被断开
# The connection will only be closed if there is no communication within a period of more than 4000ms.
# CONFIG_BT_PERIPHERAL_PREF_TIMEOUT=400

CONFIG_BT_CTLR_TX_PWR_PLUS_8=y
Expand All @@ -17,7 +17,7 @@ CONFIG_ZMK_BATTERY_REPORT_INTERVAL=60
CONFIG_CLOCK_CONTROL_NRF_K32SRC_XTAL=y
CONFIG_CLOCK_CONTROL_NRF_K32SRC_30PPM=y

#开启旋钮
#Turn on knob
CONFIG_EC11=y
CONFIG_EC11_TRIGGER_GLOBAL_THREAD=y

Expand All @@ -26,12 +26,12 @@ CONFIG_ZMK_POINTING=y

# CONFIG_ZMK_EXT_POWER=y

# 增加键盘消抖
# Add keyboard debouncing
# CONFIG_ZMK_KSCAN_DEBOUNCE_PRESS_MS=5
# CONFIG_ZMK_KSCAN_DEBOUNCE_RELEASE_MS=5
# CONFIG_ZMK_BLE_EXPERIMENTAL_CONN=y

# 启用键盘RGB功能
# Enable keyboard RGB function
# CONFIG_ZMK_RGB_UNDERGLOW=y
# CONFIG_WS2812_STRIP=y
# CONFIG_LED_STRIP=y
Expand All @@ -41,13 +41,13 @@ CONFIG_ZMK_POINTING=y
# CONFIG_ZMK_SLEEP=y
# CONFIG_ZMK_IDLE_SLEEP_TIMEOUT=900000
# CONFIG_ZMK_BLE_EXPERIMENTAL_CONN=y
#此文件下是分体两边都生效的,里面的左右conf文件是两边有不同功能配置时操作的
#This file contains separate configuration files that apply to both sides. The left and right .conf files are for operations when each side has different functional configurations.

# 蓝牙增强
# Bluetooth Enhancement
# CONFIG_BT_GATT_ENFORCE_SUBSCRIPTION=y
# CONFIG_BT_CTLR_TX_PWR_PLUS_8=y

# 改键
#Key remapping
CONFIG_ZMK_STUDIO=y
CONFIG_ZMK_STUDIO_LOCKING=n
CONFIG_ZMK_STUDIO_LOCK_ON_DISCONNECT=n
Expand Down
50 changes: 24 additions & 26 deletions config/cck_ball.keymap
Original file line number Diff line number Diff line change
Expand Up @@ -27,22 +27,29 @@
&soft_off { hold-time-ms = <2000>; };

/ {
// Vertical scroll encoder behavior
// Up and down scroll encoder behavior
scroll_vertical_encoder: scroll_vertical_encoder {
compatible = "zmk,behavior-sensor-rotate";
#sensor-binding-cells = <0>;
bindings = <&msc SCRL_DOWN>, <&msc SCRL_UP>;
tap-ms = <100>;
bindings = <&msc SCRL_UP>, <&msc SCRL_DOWN>;
tap-ms = <60>;
};

// Horizontal scroll encoder behavior
// Left and right scroll encoder behavior
scroll_horizontal_encoder: scroll_horizontal_encoder {
compatible = "zmk,behavior-sensor-rotate";
#sensor-binding-cells = <0>;
bindings = <&msc SCRL_LEFT>, <&msc SCRL_RIGHT>;
tap-ms = <100>;
};

volume_encoder: volume_encoder {
compatible = "zmk,behavior-sensor-rotate";
#sensor-binding-cells = <0>;
bindings = <&kp C_VOL_UP>, <&kp C_VOL_DN>;
tap-ms = <100>;
};

behaviors {
td_colon: td_colon {
compatible = "zmk,behavior-tap-dance";
Expand Down Expand Up @@ -120,37 +127,28 @@

QWERTY {
bindings = <
&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
&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 FSLH
&kp CAPSLOCK &kp A &kp S &kp D &kp F &kp G &kp H &kp J &kp K &kp L &kp SEMI &kp ENTER
&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 RIGHT_SHIFT
&kp LEFT_CONTROL &kp LEFT_WIN &kp LEFT_ALT &kp DELETE &kp SPACE &mo 1 &mo 2 &kp SPACE &kp SQT &kp LEFT_ARROW &kp DOWN_ARROW &kp RIGHT_ARROW
>;

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 &paranthesis_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>;
// sensor-bindings = <&inc_dec_kp C_VOL_UP C_VOL_DN &inc_dec_mkp SCRL_UP SCRL_DOWN >;
sensor-bindings = <&volume_encoder>, <&scroll_vertical_encoder>;
};

FKP_layers {
bindings = <
&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
&kp F12 &kp F1 &kp F2 &kp F3 &kp F4 &kp F5 &kp F6 &kp F7 &kp F8 &kp MINUS &kp EQL &kp F11
&kp GRAVE &kp LBKT &kp RBKT &trans &trans &trans &trans &trans &trans &kp F9 &kp F10 &kp NUBS
&trans &trans &trans &trans &trans &trans &trans &trans &trans &kp K_LOCK &trans &trans
&trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &kp PG_UP &kp BSLH
&trans &trans &trans &trans &trans &trans &mkp MB1 &mkp MB3 &mkp MB2 &kp HOME &kp PG_DN &kp END
>;

sensor-bindings = <&inc_dec_kp C_VOL_UP C_VOL_DN &inc_dec_kp PG_UP PG_DN>;
sensor-bindings = <&volume_encoder>, <&scroll_vertical_encoder>;
};

BT_layers {
bindings = <
&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
Expand Down