Merge pull request #134 from chenkevinh/lily58-encoder

Add Lily58 Left Encoder Support
This commit is contained in:
Pete Johanson 2020-08-29 21:25:02 -04:00 committed by GitHub
commit ef3c96c2ac
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 35 additions and 4 deletions

View File

@ -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

View File

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

View File

@ -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 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 {
@ -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
>;
sensor-bindings = <&inc_dec_cp M_VOLU M_VOLD>;
};
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
&trans &trans &trans &trans &trans &trans &trans &trans
>;
sensor-bindings = <&inc_dec_cp M_VOLU M_VOLD>;
};
};
};

View File

@ -1,2 +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_SPLIT_BLE_ROLE_CENTRAL=y

View File

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

View File

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