Skip to content

Commit

Permalink
Merge pull request #2 from petejohanson/zapy-and-calibrator-tweaks
Browse files Browse the repository at this point in the history
Zapy work and EC calibration snippet support.
  • Loading branch information
petejohanson authored Mar 24, 2024
2 parents f33aea8 + 447777a commit 014e279
Show file tree
Hide file tree
Showing 4 changed files with 223 additions and 10 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ on: [push, pull_request, workflow_dispatch]

jobs:
build:
uses: zmkfirmware/zmk/.github/workflows/build-user-config.yml@main
uses: petejohanson/zmk/.github/workflows/build-user-config.yml@user-build-snippets
7 changes: 7 additions & 0 deletions build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,10 @@
---
include:
- board: sporkus_le_capybara
- board: sporkus_le_capybara
snippets: [ enable_ec_calibrator ]
artifact-name: sporkus_le_capybara_calibrator
- board: lpgalaxy_le_zapybara
- board: lpgalaxy_le_zapybara
snippets: [ enable_ec_calibrator ]
artifact-name: lpgalaxy_le_zapybara_calibrator
213 changes: 213 additions & 0 deletions config/lpgalaxy_le_zapybara.keymap
Original file line number Diff line number Diff line change
@@ -0,0 +1,213 @@
/*
* Copyright (c) 2020 The ZMK Contributors
*
* SPDX-License-Identifier: MIT
*/

#include <behaviors.dtsi>
#include <dt-bindings/zmk/keys.h>
#include <dt-bindings/zmk/bt.h>
#include <dt-bindings/zmk/backlight.h>

#define NAV_L 1
#define NUM_L 2
#define MED_L 3
#define FUN_L 4

/ {
tap_dances {
shifty: shift_caps_word {
compatible = "zmk,behavior-tap-dance";
label = "TD_SHIFTY";
#binding-cells = <0>;
tapping-term-ms = <150>;
bindings = <&kp LSHFT>, <&caps_word>;
};
};

cond_layers {
compatible = "zmk,conditional-layers";
tri {
if-layers = <NUM_L NAV_L>;
then-layer = <MED_L>;
};
};
combos {
compatible = "zmk,combos";

lgui_combo {
timeout-ms = <50>;
key-positions = <13 16>;
bindings = <&kp LGUI>;
layers = <MED_L>;
};

l_curly_bracket {
timeout-ms = <50>;
key-positions = <1 11>;
bindings = <&kp LS(LBKT)>;
layers = <NUM_L>;
};

r_curly_bracket {
timeout-ms = <50>;
key-positions = <3 13>;
bindings = <&kp LS(RBKT)>;
layers = <NUM_L>;
};
lbracket {
timeout-ms = <50>;
key-positions = <11 21>;
bindings = <&kp LBKT>;
layers = <NUM_L>;
};

rbracket {
timeout-ms = <50>;
key-positions = <13 23>;
bindings = <&kp RBKT>;
layers = <NUM_L>;
};

ques_mark_combo {
timeout-ms = <50>;
key-positions = <18 28>;
bindings = <&kp LS(FSLH)>;
};

bslash_combo {
timeout-ms = <50>;
key-positions = <9 19>;
bindings = <&kp BSLH>;
};

fslash_combo {
timeout-ms = <50>;
key-positions = <19 29>;
bindings = <&kp FSLH>;
};

bootloader_combo {
timeout-ms = <50>;
key-positions = <4 5>;
bindings = <&bootloader>;
layers = <MED_L>;
};

};


keymap {
compatible = "zmk,keymap";

#ifdef QWERTY_BASE
qwerty_layer {
label = "Qwerty";
bindings = <
&kp Q &kp W &kp E &kp R &kp T &kp Y &kp U &kp I &kp O &kp P
&kp A &kp S &kp D &kp F &kp G &kp H &kp J &kp K &kp L &kp QUOT
&kp Z &kp X &kp C &kp V &kp B &kp N &kp M &kp COMMA &kp DOT &kp SEMI
&mo NAV_L &shifty &kp SPACE &mo NUM_L
>;
};
#else
colemak_dhm_layer {
label = "Base";
bindings = <
&kp Q &kp W &kp F &kp P &kp B &kp J &kp L &kp U &kp Y &kp QUOT
&kp A &kp R &kp S &kp T &kp G &kp M &kp N &kp E &kp I &kp O
&kp Z &kp X &kp C &kp D &kp V &kp K &kp H &kp COMMA &kp DOT &kp SEMI
&mo NAV_L &shifty &kp SPACE &mo NUM_L
>;
};
#endif

nav_layer {
label = "Nav";
bindings = <
&trans &trans &trans &trans &trans &kp GRAVE &kp TAB &kp GRAVE &kp BKSP &kp DEL
&sk LSHFT &sk LALT &sk LCTRL &sk LGUI &trans &kp TAB &kp LARW &kp DARW &kp UARW &kp RARW
&trans &trans &trans &trans &trans &trans &kp HOME &kp PG_DN &kp PG_UP &kp END
&trans &trans &kp RET &trans
>;
};

num_layer {
label = "Num";
bindings = <
&kp ESC &kp N7 &kp N8 &kp N9 &kp RBKT &trans &trans &trans &trans &trans
&kp MINUS &kp N4 &kp N5 &kp N6 &kp EQUAL &trans &sk LGUI &sk LCTRL &sk LALT &sk LSHFT
&kp PLUS &kp N1 &kp N2 &kp N3 &kp N0 &bt BT_SEL 0 &bt BT_SEL 1 &bt BT_SEL 2 &bt BT_SEL 3 &bt BT_SEL 4
&trans &trans &trans &trans
>;
};

media_layer {
label = "Media";
bindings = <
&trans &trans &trans &trans &trans &trans &kp C_PREV &kp C_VOL_DN &kp C_VOL_UP &kp C_NEXT
&trans &trans &trans &trans &trans &trans &trans &trans &trans &trans
&trans &trans &trans &trans &trans &trans &trans &kp C_PLAY_PAUSE &kp C_MUTE &trans
&trans &trans &trans &trans
>;
};


/*
default_layer {
// -------------------------------------------------------------------------------------
// | TAB | Q | W | E | R | T | | Y | U | I | O | P | BKSP |
// | CTRL | A | S | D | F | G | | H | J | K | L | ; | ' |
// | SHFT | Z | X | C | V | B | | N | M | , | . | / | SHFT(RET) |
// | ALT | LWR | SPC | RSE | ALT |
bindings = <
&bl BL_TOG &kp Q &kp W &kp F &kp P &kp B &kp J &kp L &kp U &kp Y &kp QUOT &bootloader
&none &hm LGUI A &hm LALT R &hm LCTRL S &hm LSHFT T &kp G &kp M &hm RSHFT N &hm RCTRL E &hm LALT I &hm LGUI O &none
&none &kp Z &kp X &kp C &kp D &kp V &kp K &kp H &kp COMMA &kp DOT &kp FSLH &none
&lt NAV_L TAB &lt OTH_L RET &kp RET &lt NUM_L SPACE &lt SYM_L BKSP
>;
};

nav_layer {
label = "Nav";
bindings = <
&none &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &none
&none &trans &trans &trans &trans &trans &trans &kp LARW &kp DARW &kp UARW &kp RARW &none
&none &trans &trans &trans &trans &trans &trans &kp HOME &kp PG_DN &kp PG_UP &kp END &none
&trans &trans &trans &kp ESC &kp DEL
>;
};

other_layer {
label = "Other";
bindings = <
&none &trans &trans &trans &trans &trans &trans &trans &trans &trans &bt BT_CLR &none
&none &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &none
&none &trans &trans &trans &trans &trans &bt BT_SEL 0 &bt BT_SEL 1 &bt BT_SEL 2 &bt BT_SEL 3 &bt BT_SEL 4 &none
&trans &trans &trans &trans &trans
>;
};

num_layer {
label = "Num";
bindings = <
&none &kp LBKT &kp N7 &kp N8 &kp N9 &kp RBKT &trans &trans &trans &trans &trans &none
&none &kp SEMI &kp N4 &kp N5 &kp N6 &kp EQUAL &trans &trans &trans &trans &trans &none
&none &kp GRAVE &kp N1 &kp N2 &kp N3 &kp BSLH &trans &trans &trans &trans &trans &none
&kp N0 &kp MINUS &trans &trans &trans
>;
};

sym_layer {
label = "Sym";
bindings = <
&none &kp LBRC &kp LS(N7) &kp LS(N8) &kp LS(N9) &kp RBRC &trans &trans &trans &trans &trans &none
&none &kp COLON &kp LS(N4) &kp LS(N5) &kp LS(N6) &kp PLUS &trans &trans &trans &trans &trans &none
&none &kp TILDE &kp LS(N1) &kp LS(N2) &kp LS(N3) &kp LS(BSLH) &trans &trans &trans &trans &trans &none
&kp LS(N0) &kp UNDER &trans &trans &trans
>;
};
*/

};
};
11 changes: 2 additions & 9 deletions config/sporkus_le_capybara.conf
Original file line number Diff line number Diff line change
@@ -1,9 +1,2 @@
CONFIG_SHELL=y
CONFIG_SHELL_MINIMAL=y
CONFIG_ADC_SHELL=n
CONFIG_HEAP_MEM_POOL_SIZE=0
CONFIG_ISR_STACK_SIZE=768
CONFIG_SHELL_STACK_SIZE=768
CONFIG_SHELL_HELP=y
CONFIG_ZMK_COMBO_MAX_KEYS_PER_COMBO=2
CONFIG_ZMK_COMBO_MAX_COMBOS_PER_KEY=2
# CONFIG_ISR_STACK_SIZE=768
# CONFIG_SHELL_STACK_SIZE=768

0 comments on commit 014e279

Please sign in to comment.