Skip to content

Commit

Permalink
added matrix to overlay
Browse files Browse the repository at this point in the history
  • Loading branch information
daniel-seiler committed Jan 3, 2024
1 parent 7a9eb21 commit 2cfdd09
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 21 deletions.
27 changes: 7 additions & 20 deletions config/boards/shields/discipline/discipline.keymap
Original file line number Diff line number Diff line change
Expand Up @@ -13,34 +13,21 @@
bindings = <
&kp ESC &kp N1 &kp N2 &kp N3 &kp N4 &kp N5 &kp N6 &kp N7 &kp N8 &kp N9 &kp N0 &kp MINUS &kp EQUAL &kp BSPC &kp DEL
&kp TAB &kp Q &kp W &kp E &kp R &kp T &kp Z &kp U &kp I &kp O &kp P &kp LBKT &kp RBKT &kp RET &kp PSCRN
&kp ESC &kp A &kp S &kp D &kp F &kp G &kp H &kp J &kp K &kp L &kp SEMI &kp SQT &none &kp RET &kp C_VOL_UP
&kp ESC &kp A &kp S &kp D &kp F &kp G &kp H &kp J &kp K &kp L &kp SEMI &kp SQT &kp RET &kp C_VOL_UP
&kp LSHFT &kp NON_US_BSLH &kp Y &kp X &kp C &kp V &kp B &kp N &kp M &kp COMMA &kp DOT &kp FSLH &kp RSHFT &kp UP &kp C_VOL_DN
&kp LCTRL &kp LGUI &kp LALT &none &none &none &kp SPACE &none &none &kp RALT &mo FUNCTION &kp E &kp LEFT &kp DOWN &kp RIGHT

// &kp B &kp B &kp B &kp B &kp B &kp B &kp B &kp B &kp B &kp B &kp B &kp B &kp B &kp B &kp B
// &kp C &kp C &kp C &kp C &kp C &kp C &kp C &kp C &kp C &kp C &kp C &kp C &none &kp C &kp C
// &kp D &kp D &kp D &kp D &kp D &kp D &kp D &kp D &kp D &kp D &kp D &kp D &kp D &kp D &kp D
// &kp E &kp E &kp E &none &none &none &kp E &none &none &kp E &kp E &kp E &kp E &kp E &kp E
//&kp ESC &kp A &kp S &kp D &kp F &kp G &kp H &kp J &kp K &kp L &kp SEMI &kp SQT &kp RET &kp ESC
//&kp LSHFT &kp LT &kp Y &kp X &kp C &kp V &kp B &kp N &kp M &kp COMMA &kp DOT &kp FSLH &kp RSHFT &kp UP &kp ESC
//&kp LCTRL &kp LWIN &kp LALT &kp SPACE &kp RALT &kp RWIN &kp RCTRL &kp LEFT &kp DOWN &kp RIGHT
&kp LCTRL &kp LGUI &kp LALT &kp SPACE &kp RALT &mo FUNCTION &kp E &kp LEFT &kp DOWN &kp RIGHT
>;

};

function_layer {
bindings = <
&trans &kp F1 &kp F2 &kp F3 &kp F4 &kp F5 &kp F6 &kp F7 &kp F8 &kp F9 &kp F10 &kp F11 &kp F12 &trans &bt BT_CLR
&trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &bt BT_SEL 0
&trans &trans &trans &trans &trans &trans &trans &kp C_PREV &kp C_PP &kp C_NEXT &trans &trans &none &trans &bt BT_SEL 0
&trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &kp C_BRI_UP &bt BT_SEL 0
&trans &trans &trans &none &none &none &trans &none &none &trans &trans &trans &trans &kp C_BRI_DN &trans
&trans &kp F1 &kp F2 &kp F3 &kp F4 &kp F5 &kp F6 &kp F7 &kp F8 &kp F9 &kp F10 &kp F11 &kp F12 &trans &bt BT_CLR
&trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &bt BT_SEL 0
&trans &trans &trans &trans &trans &trans &trans &kp C_PREV &kp C_PP &kp C_NEXT &trans &trans &trans &bt BT_SEL 0
&trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &kp C_BRI_UP &bt BT_SEL 0
&trans &trans &trans &trans &trans &trans &trans &trans &kp C_BRI_DN &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 &none &trans &trans
//&trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans
//&trans &trans &trans &none &none &none &trans &none &none &trans &trans &trans &trans &trans &trans
};
};
};
29 changes: 28 additions & 1 deletion config/boards/shields/discipline/discipline.overlay
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
/ {
chosen {
zmk,kscan = &kscan0;
zmk,matrix_transform = &default_transform;
};

kscan0: kscan {
Expand All @@ -22,7 +23,6 @@
, <&gpio0 29 GPIO_ACTIVE_HIGH>
, <&gpio0 24 GPIO_ACTIVE_HIGH>
, <&gpio0 22 GPIO_ACTIVE_HIGH>

, <&gpio0 20 GPIO_ACTIVE_HIGH>
, <&gpio0 17 GPIO_ACTIVE_HIGH>
, <&gpio0 11 GPIO_ACTIVE_HIGH>
Expand All @@ -39,4 +39,31 @@
, <&gpio1 1 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
;
};

default_transform: matrix_transform {
compatible = "zmk,matrix_transform";
rows = <5>;
columns = <15>;
row-offset = <0>;
col-offset = <0>;

// ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┬───┐
// │ ^ │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ ß │ ´ │ <- │DEL│
// ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┼───┤
// │ TAB │ Q │ W │ E │ R │ T │ Z │ U │ I │ O │ P │ Ü │ + │ENTER│ │
// ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐ ├───┤
// │ ESC │ A │ S │ D │ F │ G │ H │ J │ K │ L │ Ö │ Ä │ # │ │ │
// ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴┬───┼───┤
// │Shif│ < │ Y │ X │ C │ V │ B │ N │ M │ , │ . │ - │SHIFT │ ↑ │ │
// ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴──┬┴──┬┴──┬───┼───┼───┤
// │CTRL│SUP │ALT │ │ALT│FN │CTR│ ← │ ↓ │ → │
// └────┴────┴────┴────────────────────────┴───┴───┴───┴───┴───┴───┘
map = <
RC(0,0) RC(0,1) RC(0,2) RC(0,3) RC(0,4) RC(0,5) RC(0,6) RC(0,7) RC(0,8) RC(0,9) RC(0,10) RC(0,11) RC(0,12) RC(0,13) RC(0,14)
RC(1,0) RC(1,1) RC(1,2) RC(1,3) RC(1,4) RC(1,5) RC(1,6) RC(1,7) RC(1,8) RC(1,9) RC(1,10) RC(1,11) RC(1,12) RC(1,13) RC(1,14)
RC(2,0) RC(2,1) RC(2,2) RC(2,3) RC(2,4) RC(2,5) RC(2,6) RC(2,7) RC(2,8) RC(2,9) RC(2,10) RC(2,11) RC(2,13) RC(2,14)
RC(3,0) RC(3,1) RC(3,2) RC(3,3) RC(3,4) RC(3,5) RC(3,6) RC(3,7) RC(3,8) RC(3,9) RC(3,10) RC(3,11) RC(3,12) RC(3,13) RC(3,14)
RC(4,0) RC(4,1) RC(4,2) RC(4,6) RC(4,9) RC(4,10) RC(4,11) RC(4,12) RC(4,13) RC(4,14)
>;
};
};

0 comments on commit 2cfdd09

Please sign in to comment.