Browse Source

Added left encoder support

xmkb
Kevin 4 years ago
parent
commit
e616fc2c81
  1. 3
      app/.gitignore
  2. 4
      app/boards/shields/lily58/lily58.conf
  3. 14
      app/boards/shields/lily58/lily58.dtsi
  4. 42
      app/boards/shields/lily58/lily58.keymap

3
app/.gitignore vendored

@ -1 +1,4 @@
build/ build/
build_left.bat
flash.bat
prj.conf

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

@ -1,2 +1,6 @@
# 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

14
app/boards/shields/lily58/lily58.dtsi

@ -45,6 +45,20 @@ 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>;
status = "disabled";
};
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";
}; };

42
app/boards/shields/lily58/lily58.keymap

@ -16,41 +16,47 @@
&kp ESC &kp NUM_1 &kp NUM_2 &kp NUM_3 &kp NUM_4 &kp NUM_5 &kp NUM_6 &kp NUM_7 &kp NUM_8 &kp NUM_9 &kp NUM_0 &kp GRAV &kp ESC &kp NUM_1 &kp NUM_2 &kp NUM_3 &kp NUM_4 &kp NUM_5 &kp NUM_6 &kp NUM_7 &kp NUM_8 &kp NUM_9 &kp NUM_0 &kp GRAV
&kp TAB &kp Q &kp W &kp E &kp R &kp T &kp Y &kp U &kp I &kp O &kp P &kp MINUS &kp TAB &kp Q &kp W &kp E &kp R &kp T &kp Y &kp U &kp I &kp O &kp P &kp MINUS
&kp LCTL &kp A &kp S &kp D &kp F &kp G &kp H &kp J &kp K &kp L &kp SCLN &kp QUOT &kp LCTL &kp A &kp S &kp D &kp F &kp G &kp H &kp J &kp K &kp L &kp SCLN &kp QUOT
&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 &cp M_PLAY &kp DEL &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 LGUI &kp LALT &kp BKSP &mo 1 &mo 2 &kp SPC &kp RET &kp RGUI
>; >;
sensor-bindings = <&inc_dec_cp LBKT RBKT>;
}; };
lower_layer { lower_layer {
// ------------------------------------------------------------------------------------------------------------ // ------------------------------------------------------------------------------------------------------------
// | | | | | | | | | | | | | | // | | | | | | | | | | | | | |
// | F1 | F2 | F3 | F4 | F5 | F6 | | F7 | F8 | F9 | F10 | F11 | F12 | // | ` | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | |
// | ` | ! | @ | # | $ | % | | ^ | & | * | ( | ) | ~ | // | F1 | F2 | F3 | F4 | F5 | F6 | | | <- | ^ | v | -> | |
// | | | | | | | | | | | _ | + | { | } | "|" | // | F7 | F8 | F9 | F10 | F11 | F12 | | | | + | - | = | [ | ] | \ |
// | | | | | | | | | | // | | | | | | | | | |
bindings = < bindings = <
&trans &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 F1 &kp F2 &kp F3 &kp F4 &kp F5 &kp F6 &kp F7 &kp F8 &kp F9 &kp F10 &kp F11 &kp F12 &trans &kp LCUR &kp AMPS &kp KMLT &kp LPRN &kp RCUR &trans &trans &trans &trans &trans &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 &kp COLN &kp CURU &kp PRCT &kp CRRT &kp KPLS &kp CLCK &kp LARW &kp DARW &kp UARW &kp RARW &trans
&trans &trans &trans &trans &trans &trans &trans &trans &trans &kp MINUS &kp KPLS &kp LCUR &kp RCUR &kp PIPE &trans &kp GRAV &kp BANG &kp ATSN &kp HASH &kp PIPE &trans &trans &kp INS &kp HOME &kp PGDN &kp PGUP &kp END &trans
&trans &trans &trans &trans &trans &trans &trans &trans &kp LPRN &kp RPRN &trans &trans &trans &trans &trans &trans
>; >;
sensor-bindings = <&inc_dec_cp M_VOLU M_VOLD>;
}; };
raise_layer { raise_layer {
// ------------------------------------------------------------------------------------------------------------ // ------------------------------------------------------------------------------------------------------------
// | | | | | | | | | | | | | | // | | | | | | | | | | | | | |
// | ` | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | | // | F1 | F2 | F3 | F4 | F5 | F6 | | F7 | F8 | F9 | F10 | F11 | F12 |
// | F1 | F2 | F3 | F4 | F5 | F6 | | | <- | ^ | v | -> | | // | ` | ! | @ | # | $ | % | | ^ | & | * | ( | ) | ~ |
// | F7 | F8 | F9 | F10 | F11 | F12 | | | | + | - | = | [ | ] | \ | // | | | | | | | | | | | _ | + | { | } | "|" |
// | | | | | | | | | | // | | | | | | | | | |
bindings = < bindings = <
&trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &tog 2 &kp KPLS &kp KDIV &kp KMLT &kp KMIN &trans &trans &trans &trans &trans &trans
&kp GRAV &kp NUM_1 &kp NUM_2 &kp NUM_3 &kp NUM_4 &kp NUM_5 &kp NUM_6 &kp NUM_7 &kp NUM_8 &kp NUM_9 &kp NUM_0 &trans &trans &kp LBKT &kp NUM_7 &kp NUM_8 &kp NUM_9 &kp RBKT &trans &trans &trans &trans &trans &trans
&kp F1 &kp F2 &kp F3 &kp F4 &kp F5 &kp F6 &trans &kp LARW &kp DARW &kp UARW &kp RARW &trans &trans &kp SCLN &kp NUM_4 &kp NUM_5 &kp NUM_6 &kp EQL &trans &cp M_PREV &cp M_VOLD &cp M_VOLU &cp M_NEXT &trans
&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 &kp TILD &kp NUM_1 &kp NUM_2 &kp NUM_3 &kp BSLH &trans &trans &cp M_STOP &cp M_PLAY &cp M_MUTE &trans &trans &trans
&trans &trans &trans &trans &trans &trans &trans &trans &kp NUM_0 &kp DOT &kp RET &trans &trans &trans &trans &trans
>; >;
sensor-bindings = <&inc_dec_cp M_VOLU M_VOLD>;
}; };
}; };
}; };

Loading…
Cancel
Save