From 13fdbda3ce4e960dc1a5bfe33d2ae19cde7dd9ad Mon Sep 17 00:00:00 2001 From: Clayton Wilson Date: Sat, 5 Oct 2024 15:21:25 -0500 Subject: [PATCH] Add left and right matrix definitions --- config/cradio.keymap | 35 ++++++++++++++++++++++++++++++++--- 1 file changed, 32 insertions(+), 3 deletions(-) diff --git a/config/cradio.keymap b/config/cradio.keymap index 7f2958c..0cac462 100644 --- a/config/cradio.keymap +++ b/config/cradio.keymap @@ -10,10 +10,9 @@ #define HRMR(k1,k2,k3,k4) &ht RGUI k1 &ht RCTRL k2 &ht RALT k3 &ht RSHFT k4 / { - // Your keyboard node - key_matrix { + left_key_matrix { compatible = "zmk,matrix-transform"; - rows = <4>; // 3 rows + rows = <4>; // 3 rows columns = <6>; // 3 columns row-gpios = <&gpio0 1 GPIO_ACTIVE_LOW>, // Pin for row 1 @@ -27,6 +26,36 @@ <&gpio0 14 GPIO_ACTIVE_LOW>, // Pin for column 4 <&gpio0 16 GPIO_ACTIVE_LOW>, // Pin for column 5 <&gpio0 10 GPIO_ACTIVE_LOW>; // Pin for column 6 + + // The map property defines the row/column positions for the key matrix + map = <0 0>, <0 1>, <0 2>, <0 3>, <0 4>, // Row 0 + <1 0>, <1 1>, <1 2>, <1 3>, <1 4>, // Row 1 + <2 0>, <2 1>, <2 2>, <2 3>, <2 4>, // Row 2 + <3 3>, <3 4>, <3 5>; // Row 3 aka thumb cluster + }; + + right_key_matrix { + compatible = "zmk,matrix-transform"; + rows = <4>; // 3 rows + columns = <6>; // 3 columns + + row-gpios = <&gpio0 1 GPIO_ACTIVE_LOW>, // Pin for row 1 + <&gpio0 0 GPIO_ACTIVE_LOW>, // Pin for row 2 + <&gpio0 2 GPIO_ACTIVE_LOW>, // Pin for row 3 + <&gpio0 3 GPIO_ACTIVE_LOW>; // Pin for row 4 + + col-gpios = <&gpio0 19 GPIO_ACTIVE_LOW>, // Pin for column 1 + <&gpio0 18 GPIO_ACTIVE_LOW>, // Pin for column 2 + <&gpio0 15 GPIO_ACTIVE_LOW>, // Pin for column 3 + <&gpio0 14 GPIO_ACTIVE_LOW>, // Pin for column 4 + <&gpio0 16 GPIO_ACTIVE_LOW>, // Pin for column 5 + <&gpio0 10 GPIO_ACTIVE_LOW>; // Pin for column 6 + + // The map property defines the row/column positions for the key matrix + map = <0 1>, <0 2>, <0 3>, <0 4>, <0 5>, // Row 0 + <1 1>, <1 2>, <1 3>, <1 4>, <1 5>, // Row 1 + <2 1>, <2 2>, <2 3>, <2 4>, <2 5>, // Row 2 + <3 0>, <3 1>, <3 2>; // Row 3 aka thumb cluster }; behaviors {