From 22fa1c329f23279480998d42a008e088109b5f3c Mon Sep 17 00:00:00 2001 From: Peter Johanson Date: Sun, 24 Mar 2024 13:52:03 -0700 Subject: [PATCH 1/3] Zapy work and EC calibration snippet support. --- build.yaml | 7 + config/lpgalaxy_le_zapybara.keymap | 213 +++++++++++++++++++++++++++++ config/sporkus_le_capybara.conf | 11 +- 3 files changed, 222 insertions(+), 9 deletions(-) create mode 100644 config/lpgalaxy_le_zapybara.keymap diff --git a/build.yaml b/build.yaml index dc21ad7..c23d580 100644 --- a/build.yaml +++ b/build.yaml @@ -14,3 +14,10 @@ --- include: - board: sporkus_le_capybara + - board: sporkus_le_capybara + cmake-args: -S enable_ec_calibrator + artifact-name: sporkus_le_capybara_calibrator + - board: lpgalaxy_le_zapybara + - board: lpgalaxy_le_zapybara + cmake-args: -S enable_ec_calibrator + artifact-name: lpgalaxy_le_zapybara_calibrator diff --git a/config/lpgalaxy_le_zapybara.keymap b/config/lpgalaxy_le_zapybara.keymap new file mode 100644 index 0000000..802b50e --- /dev/null +++ b/config/lpgalaxy_le_zapybara.keymap @@ -0,0 +1,213 @@ +/* + * Copyright (c) 2020 The ZMK Contributors + * + * SPDX-License-Identifier: MIT + */ + +#include +#include +#include +#include + +#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 = ; + then-layer = ; + }; + }; + combos { + compatible = "zmk,combos"; + + lgui_combo { + timeout-ms = <50>; + key-positions = <13 16>; + bindings = <&kp LGUI>; + layers = ; + }; + + l_curly_bracket { + timeout-ms = <50>; + key-positions = <1 11>; + bindings = <&kp LS(LBKT)>; + layers = ; + }; + + r_curly_bracket { + timeout-ms = <50>; + key-positions = <3 13>; + bindings = <&kp LS(RBKT)>; + layers = ; + }; + lbracket { + timeout-ms = <50>; + key-positions = <11 21>; + bindings = <&kp LBKT>; + layers = ; + }; + + rbracket { + timeout-ms = <50>; + key-positions = <13 23>; + bindings = <&kp RBKT>; + layers = ; + }; + + 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 = ; + }; + + }; + + + 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 + < NAV_L TAB < OTH_L RET &kp RET < NUM_L SPACE < 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 + >; + }; + */ + + }; +}; diff --git a/config/sporkus_le_capybara.conf b/config/sporkus_le_capybara.conf index f348643..bb6379a 100644 --- a/config/sporkus_le_capybara.conf +++ b/config/sporkus_le_capybara.conf @@ -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 From e8bbdcd245aefb1f1f2b8a3a602f979b9ea6e832 Mon Sep 17 00:00:00 2001 From: Peter Johanson Date: Sun, 24 Mar 2024 14:06:21 -0700 Subject: [PATCH 2/3] Play with snippents in build.yaml. --- build.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build.yaml b/build.yaml index c23d580..a1791bf 100644 --- a/build.yaml +++ b/build.yaml @@ -15,9 +15,9 @@ include: - board: sporkus_le_capybara - board: sporkus_le_capybara - cmake-args: -S enable_ec_calibrator + snippets: [ enable_ec_calibrator ] artifact-name: sporkus_le_capybara_calibrator - board: lpgalaxy_le_zapybara - board: lpgalaxy_le_zapybara - cmake-args: -S enable_ec_calibrator + snippets: [ enable_ec_calibrator ] artifact-name: lpgalaxy_le_zapybara_calibrator From 447777ad6e99ba6812b8637a5821540826d0c110 Mon Sep 17 00:00:00 2001 From: Peter Johanson Date: Sun, 24 Mar 2024 14:09:59 -0700 Subject: [PATCH 3/3] Use build tweaks. --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index d74fb89..326312d 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -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