Browse Source

Merge pull request #134 from chenkevinh/lily58-encoder

Add Lily58 Left Encoder Support
xmkb
Pete Johanson 4 years ago committed by GitHub
parent
commit
ef3c96c2ac
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      app/boards/shields/lily58/lily58.conf
  2. 13
      app/boards/shields/lily58/lily58.dtsi
  3. 6
      app/boards/shields/lily58/lily58.keymap
  4. 4
      app/boards/shields/lily58/lily58_left.conf
  5. 6
      app/boards/shields/lily58/lily58_left.overlay
  6. 2
      app/boards/shields/lily58/lily58_right.overlay

4
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 # Uncomment the following line to enable the Lily58 OLED Display
# CONFIG_ZMK_DISPLAY=y # CONFIG_ZMK_DISPLAY=y

13
app/boards/shields/lily58/lily58.dtsi

@ -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 { bt_unpair_combo: bt_unpair_combo {
compatible = "zmk,bt-unpair-combo"; compatible = "zmk,bt-unpair-combo";
}; };

6
app/boards/shields/lily58/lily58.keymap

@ -19,6 +19,8 @@
&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 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 &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 { lower_layer {
@ -35,6 +37,8 @@
&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 &trans &kp MINUS &kp KPLS &kp LCUR &kp RCUR &kp PIPE
&trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans
>; >;
sensor-bindings = <&inc_dec_cp M_VOLU M_VOLD>;
}; };
raise_layer { raise_layer {
@ -51,6 +55,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 &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 &trans &trans &trans &trans &trans &trans &trans &trans
>; >;
sensor-bindings = <&inc_dec_cp M_VOLU M_VOLD>;
}; };
}; };
}; };

4
app/boards/shields/lily58/lily58_left.conf

@ -1,2 +1,6 @@
# Uncomment to enable encoder
# CONFIG_EC11=y
# CONFIG_EC11_TRIGGER_GLOBAL_THREAD=y
CONFIG_ZMK_SPLIT=y CONFIG_ZMK_SPLIT=y
CONFIG_ZMK_SPLIT_BLE_ROLE_CENTRAL=y CONFIG_ZMK_SPLIT_BLE_ROLE_CENTRAL=y

6
app/boards/shields/lily58/lily58_left.overlay

@ -17,6 +17,10 @@
; ;
}; };
&left_encoder {
status = "okay";
};
&bt_unpair_combo { &bt_unpair_combo {
key-positions = <0 42>; key-positions = <0 53>;
}; };

2
app/boards/shields/lily58/lily58_right.overlay

@ -22,5 +22,5 @@
}; };
&bt_unpair_combo { &bt_unpair_combo {
key-positions = <11 43>; key-positions = <11 54>;
}; };

Loading…
Cancel
Save