summaryrefslogtreecommitdiff
path: root/app/boards/shields/lily58
diff options
context:
space:
mode:
Diffstat (limited to 'app/boards/shields/lily58')
-rw-r--r--app/boards/shields/lily58/lily58.conf4
-rw-r--r--app/boards/shields/lily58/lily58.dtsi15
-rw-r--r--app/boards/shields/lily58/lily58.keymap19
-rw-r--r--app/boards/shields/lily58/lily58_left.conf7
-rw-r--r--app/boards/shields/lily58/lily58_left.overlay6
-rw-r--r--app/boards/shields/lily58/lily58_right.conf1
-rw-r--r--app/boards/shields/lily58/lily58_right.overlay2
7 files changed, 42 insertions, 12 deletions
diff --git a/app/boards/shields/lily58/lily58.conf b/app/boards/shields/lily58/lily58.conf
index 73f0d9d..31eb7c6 100644
--- a/app/boards/shields/lily58/lily58.conf
+++ b/app/boards/shields/lily58/lily58.conf
@@ -1,2 +1,6 @@
+# Uncomment to enable encoder
+# CONFIG_EC11=y
+# CONFIG_EC11_TRIGGER_GLOBAL_THREAD=y
+
# Uncomment the following line to enable the Lily58 OLED Display
# CONFIG_ZMK_DISPLAY=y
diff --git a/app/boards/shields/lily58/lily58.dtsi b/app/boards/shields/lily58/lily58.dtsi
index 24f6805..556909f 100644
--- a/app/boards/shields/lily58/lily58.dtsi
+++ b/app/boards/shields/lily58/lily58.dtsi
@@ -15,7 +15,7 @@
default_transform: keymap_transform_0 {
compatible = "zmk,matrix-transform";
columns = <16>;
- rows = <4>;
+ rows = <5>;
// | SW6 | SW5 | SW4 | SW3 | SW2 | SW1 | | SW1 | SW2 | SW3 | SW4 | SW5 | SW6 |
// | SW12 | SW11 | SW10 | SW9 | SW8 | SW7 | | SW7 | SW8 | SW9 | SW10 | SW11 | SW12 |
// | SW18 | SW17 | SW16 | SW15 | SW14 | SW13 | | SW13 | SW14 | SW15 | SW16 | SW17 | SW18 |
@@ -45,6 +45,19 @@ RC(3,0) RC(3,1) RC(3,2) RC(3,3) RC(3,4) RC(3,5) RC(4,5) RC(4,6) RC(3,6) RC(3,7)
};
+ left_encoder: encoder_left {
+ compatible = "alps,ec11";
+ label = "LEFT_ENCODER";
+ a-gpios = <&pro_micro_a 3 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>;
+ b-gpios = <&pro_micro_a 2 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>;
+ resolution = <4>;
+ };
+
+ sensors {
+ compatible = "zmk,keymap-sensors";
+ sensors = <&left_encoder>;
+ };
+
bt_unpair_combo: bt_unpair_combo {
compatible = "zmk,bt-unpair-combo";
};
diff --git a/app/boards/shields/lily58/lily58.keymap b/app/boards/shields/lily58/lily58.keymap
index 71bf4ad..61c19f8 100644
--- a/app/boards/shields/lily58/lily58.keymap
+++ b/app/boards/shields/lily58/lily58.keymap
@@ -1,5 +1,6 @@
#include <behaviors.dtsi>
#include <dt-bindings/zmk/keys.h>
+#include <dt-bindings/zmk/bt.h>
/ {
keymap {
@@ -19,22 +20,26 @@
&kp LSFT &kp Z &kp X &kp C &kp V &kp B &kp LBKT &kp RBKT &kp N &kp M &kp CMMA &kp DOT &kp FSLH &kp RSFT
&kp LALT &kp LGUI &mo 1 &kp SPC &kp RET &mo 2 &kp BKSP &kp RGUI
>;
+
+ sensor-bindings = <&inc_dec_cp M_VOLU M_VOLD>;
};
lower_layer {
// ------------------------------------------------------------------------------------------------------------
-// | | | | | | | | | | | | | |
+// | BTCLR | BT1 | BT2 | BT3 | BT4 | BT5 | | | | | | | |
// | F1 | F2 | F3 | F4 | F5 | F6 | | F7 | F8 | F9 | F10 | F11 | F12 |
// | ` | ! | @ | # | $ | % | | ^ | & | * | ( | ) | ~ |
// | | | | | | | | | | | _ | + | { | } | "|" |
// | | | | | | | | | |
bindings = <
-&trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &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
-&kp GRAV &kp BANG &kp ATSN &kp HASH &kp CURU &kp PRCT &kp CRRT &kp AMPS &kp KMLT &kp LPRN &kp RPRN &kp TILD
-&trans &trans &trans &trans &trans &trans &trans &trans &trans &kp MINUS &kp KPLS &kp LCUR &kp RCUR &kp PIPE
- &trans &trans &trans &trans &trans &trans &trans &trans
+&bt BT_CLR &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 &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
+&kp GRAV &kp BANG &kp ATSN &kp HASH &kp CURU &kp PRCT &kp CRRT &kp AMPS &kp KMLT &kp LPRN &kp RPRN &kp TILD
+&trans &trans &trans &trans &trans &trans &trans &trans &trans &kp MINUS &kp KPLS &kp LCUR &kp RCUR &kp PIPE
+ &trans &trans &trans &trans &trans &trans &trans &trans
>;
+
+ sensor-bindings = <&inc_dec_cp M_VOLU M_VOLD>;
};
raise_layer {
@@ -51,6 +56,8 @@
&kp F7 &kp F8 &kp F9 &kp F10 &kp F11 &kp F12 &trans &trans &kp KPLS &kp MINUS &kp EQL &kp LBKT &kp RBKT &kp BSLH
&trans &trans &trans &trans &trans &trans &trans &trans
>;
+
+ sensor-bindings = <&inc_dec_cp M_VOLU M_VOLD>;
};
};
};
diff --git a/app/boards/shields/lily58/lily58_left.conf b/app/boards/shields/lily58/lily58_left.conf
index 338fa59..6ff95d5 100644
--- a/app/boards/shields/lily58/lily58_left.conf
+++ b/app/boards/shields/lily58/lily58_left.conf
@@ -1,3 +1,6 @@
+# Uncomment to enable encoder
+# CONFIG_EC11=y
+# CONFIG_EC11_TRIGGER_GLOBAL_THREAD=y
+
CONFIG_ZMK_SPLIT=y
-CONFIG_ZMK_SPLIT_BLE_ROLE_CENTRAL=y
-CONFIG_ZMK_BLE_UNPAIR_COMBO=y \ No newline at end of file
+CONFIG_ZMK_SPLIT_BLE_ROLE_CENTRAL=y \ No newline at end of file
diff --git a/app/boards/shields/lily58/lily58_left.overlay b/app/boards/shields/lily58/lily58_left.overlay
index c6f630f..1752b6e 100644
--- a/app/boards/shields/lily58/lily58_left.overlay
+++ b/app/boards/shields/lily58/lily58_left.overlay
@@ -17,6 +17,10 @@
;
};
+&left_encoder {
+ status = "okay";
+};
+
&bt_unpair_combo {
- key-positions = <0 42>;
+ key-positions = <0 53>;
};
diff --git a/app/boards/shields/lily58/lily58_right.conf b/app/boards/shields/lily58/lily58_right.conf
index cf16779..990cf7c 100644
--- a/app/boards/shields/lily58/lily58_right.conf
+++ b/app/boards/shields/lily58/lily58_right.conf
@@ -1,3 +1,2 @@
CONFIG_ZMK_SPLIT=y
CONFIG_ZMK_SPLIT_BLE_ROLE_PERIPHERAL=y
-CONFIG_ZMK_BLE_UNPAIR_COMBO=y
diff --git a/app/boards/shields/lily58/lily58_right.overlay b/app/boards/shields/lily58/lily58_right.overlay
index 84f0b06..6c8e493 100644
--- a/app/boards/shields/lily58/lily58_right.overlay
+++ b/app/boards/shields/lily58/lily58_right.overlay
@@ -22,5 +22,5 @@
};
&bt_unpair_combo {
- key-positions = <11 43>;
+ key-positions = <11 54>;
};