Skip to content
Open
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
1 change: 1 addition & 0 deletions Kyo-test
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

26 changes: 22 additions & 4 deletions config/cck_ball.keymap
Original file line number Diff line number Diff line change
Expand Up @@ -28,21 +28,25 @@

/ {
// 上下滚动编码器行为

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>;
};

// 左右滚动编码器行为

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>;
};

behaviors {
};

Expand All @@ -53,7 +57,7 @@
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 &lt 4 S &kp D &lt 3 F &kp G &kp H &kp J &kp K &kp L &kp SEMI &kp SQT
&kp LEFT_CONTROL &kp A &lt 4 S &kp D &lt 3 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 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
>;
Expand Down Expand Up @@ -106,8 +110,22 @@
&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>,
// 编码器1:上下滚动,,,,,,,,,
<&scroll_horizontal_encoder>;

// 编码器2:左右滚动
};

layer_5 {
bindings = <
&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
>;
};
};
};