Skip to content

Commit

Permalink
Merge pull request #2 from rastasheep/doc-fix
Browse files Browse the repository at this point in the history
Doc fix
  • Loading branch information
rastasheep authored Apr 9, 2022
2 parents 20c5b1a + efcfdbf commit 0234e30
Show file tree
Hide file tree
Showing 3 changed files with 85 additions and 85 deletions.
164 changes: 82 additions & 82 deletions config/lily58.keymap
Original file line number Diff line number Diff line change
Expand Up @@ -9,103 +9,103 @@
#include <dt-bindings/zmk/bt.h>
#include <dt-bindings/zmk/ext_power.h>

#define TAPPING_TERM 400
#define COMBO_TIMEOUT 40
#define TAPPING_TERM 400
#define COMBO_TIMEOUT 40

#define DEFAULT 0
#define LOWER 1
#define RAISE 2
#define ADJUST 3
#define DEFAULT 0
#define LOWER 1
#define RAISE 2
#define ADJUST 3

// Friendlier volume definitions, tap volume down, hold mute
#define VOLUME_DOWN &mt K_MUTE C_VOLUME_DOWN
#define VOLUME_UP &kp C_VOLUME_UP
#define VOLUME_DOWN &mt K_MUTE C_VOLUME_DOWN
#define VOLUME_UP &kp C_VOLUME_UP

&kscan0 {
debounce-press-ms = <10>;
debounce-release-ms = <10>;
};

/ {
behaviors {
/*
* td_media mimics the behaviour of AirPods controls:
* - tap once for play / pause
* - tap twice for next track
* - tap three times for previous track
*/
td_media: tap_dance_media {
compatible = "zmk,behavior-tap-dance";
label = "TAP_DANCE_MEDIA";
#binding-cells = <0>;
tapping-term-ms = <TAPPING_TERM>;
bindings = <&kp C_PLAY_PAUSE>, <&kp C_NEXT>, <&kp C_PREVIOUS>;
};
behaviors {
/*
* td_media mimics the behaviour of AirPods controls:
* - tap once for play / pause
* - tap twice for next track
* - tap three times for previous track
*/
td_media: tap_dance_media {
compatible = "zmk,behavior-tap-dance";
label = "TAP_DANCE_MEDIA";
#binding-cells = <0>;
tapping-term-ms = <TAPPING_TERM>;
bindings = <&kp C_PLAY_PAUSE>, <&kp C_NEXT>, <&kp C_PREVIOUS>;
};

/*
* td_grave groups grave / locking functions into one key:
* - tap once for grave
* - tap twice to lock the host
* - tap three times to put the host to sleep
*/
td_grave: tap_dance_grave {
compatible = "zmk,behavior-tap-dance";
label = "TAP_DANCE_GRAVE";
#binding-cells = <0>;
tapping-term-ms = <TAPPING_TERM>;
bindings = <&kp GRAVE>, <&kp LG(LC(Q))>, <&kp LG(LA(C_EJECT))>;
};
};
/*
* td_grave groups grave / locking functions into one key:
* - tap once for grave
* - tap twice to lock the host
* - tap three times to put the host to sleep
*/
td_grave: tap_dance_grave {
compatible = "zmk,behavior-tap-dance";
label = "TAP_DANCE_GRAVE";
#binding-cells = <0>;
tapping-term-ms = <TAPPING_TERM>;
bindings = <&kp GRAVE>, <&kp LG(LC(Q))>, <&kp LG(LA(C_EJECT))>;
};
};

conditional_layers {
compatible = "zmk,conditional-layers";
tri_layer {
if-layers = <LOWER RAISE>;
conditional_layers {
compatible = "zmk,conditional-layers";
tri_layer {
if-layers = <LOWER RAISE>;
then-layer = <ADJUST>;
};
};
};
};

keymap {
compatible = "zmk,keymap";
keymap {
compatible = "zmk,keymap";

default_layer {
bindings = <
&kp ESC &kp N1 &kp N2 &kp N3 &kp N4 &kp N5 &kp N6 &kp N7 &kp N8 &kp N9 &kp N0 &td_grave
&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 LCTRL &kp A &kp S &kp D &kp F &kp G &kp H &kp J &kp K &kp L &kp SEMI &kp SQT
&kp LSHFT &kp Z &kp X &kp C &kp V &kp B &kp LBKT &kp RBKT &kp N &kp M &kp COMMA &kp DOT &kp FSLH &kp RSHFT
&kp LALT &kp LGUI &mo LOWER &kp SPACE &kp RET &mo RAISE &kp BSPC &kp RGUI
>;
};
default_layer {
bindings = <
&kp ESC &kp N1 &kp N2 &kp N3 &kp N4 &kp N5 &kp N6 &kp N7 &kp N8 &kp N9 &kp N0 &td_grave
&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 LCTRL &kp A &kp S &kp D &kp F &kp G &kp H &kp J &kp K &kp L &kp SEMI &kp SQT
&kp LSHFT &kp Z &kp X &kp C &kp V &kp B &kp LBKT &kp RBKT &kp N &kp M &kp COMMA &kp DOT &kp FSLH &kp RSHFT
&kp LALT &kp LGUI &mo LOWER &kp SPACE &kp RET &mo RAISE &kp BSPC &kp RGUI
>;
};

lower_layer {
bindings = <
&bt BT_CLR &bt BT_SEL 0 &bt BT_SEL 1 &bt BT_SEL 2 &bt BT_SEL 3 &bt BT_SEL 4 &none &none &none &none &none &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 GRAVE &kp EXCL &kp AT &kp HASH &kp DOLLAR &kp PRCNT &kp CARET &kp AMPS &kp KP_MULTIPLY &kp LPAR &kp RPAR &kp TILDE
&none &ext_power EP_ON &ext_power EP_OFF &ext_power EP_TOG &none &none &none &none &none &kp MINUS &kp KP_PLUS &kp LBRC &kp RBRC &kp PIPE
&none &none &trans &trans &trans &trans &none &none
>;
};
lower_layer {
bindings = <
&bt BT_CLR &bt BT_SEL 0 &bt BT_SEL 1 &bt BT_SEL 2 &bt BT_SEL 3 &bt BT_SEL 4 &none &none &none &none &none &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 GRAVE &kp EXCL &kp AT &kp HASH &kp DOLLAR &kp PRCNT &kp CARET &kp AMPS &kp KP_MULTIPLY &kp LPAR &kp RPAR &kp TILDE
&none &ext_power EP_ON &ext_power EP_OFF &ext_power EP_TOG &none &none &none &none &none &kp MINUS &kp KP_PLUS &kp LBRC &kp RBRC &kp PIPE
&none &none &trans &trans &trans &trans &none &none
>;
};

raise_layer {
bindings = <
&trans &none &none &none &none &none &kp LC(UP) &none &td_media VOLUME_DOWN VOLUME_UP &trans
&none &none &none &none &none &none &none &none &none &none &none &none
&none &none &none &none &none &none &kp LEFT &kp DOWN &kp UP &kp RIGHT &none &none
&none &none &none &none &none &none &none &none &kp PLUS &kp MINUS &kp EQUAL &kp STAR &kp BSLH &none
&none &none &trans &trans &trans &trans &none &none
>;
};
raise_layer {
bindings = <
&trans &none &none &none &none &none &kp LC(UP) &none &td_media VOLUME_DOWN VOLUME_UP &trans
&none &none &none &none &none &none &none &none &none &none &none &none
&none &none &none &none &none &none &kp LEFT &kp DOWN &kp UP &kp RIGHT &none &none
&none &none &none &none &none &none &none &none &kp PLUS &kp MINUS &kp EQUAL &kp STAR &kp BSLH &none
&none &none &trans &trans &trans &trans &none &none
>;
};

adjust_layer {
bindings = <
&none &none &none &none &none &none &none &none &none &none &none &none
&none &none &none &none &none &none &none &none &none &none &none &none
&none &none &none &none &none &none &kp LA(LG(LEFT)) &kp LA(LG(DOWN)) &kp LA(LG(UP)) &kp LA(LG(RIGHT)) &none &none
&none &none &none &none &none &none &none &none &none &none &none &none &none &none
&none &none &trans &trans &trans &trans &none &none
>;
};
};
};
adjust_layer {
bindings = <
&none &none &none &none &none &none &none &none &none &none &none &none
&none &none &none &none &none &none &none &none &none &none &none &none
&none &none &none &none &none &none &kp LA(LG(LEFT)) &kp LA(LG(DOWN)) &kp LA(LG(UP)) &kp LA(LG(RIGHT)) &none &none
&none &none &none &none &none &none &none &none &none &none &none &none &none &none
&none &none &trans &trans &trans &trans &none &none
>;
};
};
};
2 changes: 1 addition & 1 deletion draw.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ def small(key):
"right": [
["", "⧉", trans(""), "⏯", "🔈", "🔊", trans("`🔒")],
["", trans(""), trans(""), trans(""), trans(""), trans(""), trans("")],
["", "←", "", "", "→", trans(""), trans("")],
["", "←", "", "", "→", trans(""), trans("")],
[trans(""), "+", "-", "=", "*", "\\", trans("")],
],
"thumbs": {
Expand Down
4 changes: 2 additions & 2 deletions keymap.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 0234e30

Please sign in to comment.