diff options
author | Jack Sangdahl <[email protected]> | 2024-02-25 16:14:27 -0700 |
---|---|---|
committer | Jack Sangdahl <[email protected]> | 2024-02-25 16:14:27 -0700 |
commit | c06a8f9c838e25b49b27c1d9393fdc08b6c33fe2 (patch) | |
tree | c229311728bf2a4cdb07562b423126b31320d56f | |
parent | f77ce1e74ba8e0161688b018d20a8aa145122119 (diff) | |
download | zmk_build-c06a8f9c838e25b49b27c1d9393fdc08b6c33fe2.tar.gz zmk_build-c06a8f9c838e25b49b27c1d9393fdc08b6c33fe2.zip |
move common configuration
-rw-r--r-- | config/corne.keymap | 46 | ||||
-rw-r--r-- | config/revxlp.keymap | 46 | ||||
-rw-r--r-- | config/splitkb_aurora_sweep.keymap | 38 | ||||
-rw-r--r-- | config/util.h | 48 |
4 files changed, 49 insertions, 129 deletions
diff --git a/config/corne.keymap b/config/corne.keymap index 6a7c5b1..5673fdf 100644 --- a/config/corne.keymap +++ b/config/corne.keymap @@ -6,10 +6,6 @@ #include <dt-bindings/zmk/bt.h> #include "util.h" -< { - tapping-term-ms = <100>; -}; - / { keymap { compatible = "zmk,keymap"; @@ -39,48 +35,6 @@ }; }; - behaviors { - hm: homerow_mods { - compatible = "zmk,behavior-hold-tap"; - label = "HOMEROW_MODS"; - #binding-cells = <2>; - tapping-term-ms = <130>; - quick-tap-ms = <160>; - flavor = "tap-preferred"; - bindings = <&kp>, <&kp>; - }; - - pnp: play_next_prev { - compatible = "zmk,behavior-tap-dance"; - label = "PLAY_NEXT_PREV"; - #binding-cells = <0>; - tapping-term-ms = <210>; - bindings = <&kp C_PLAY>, <&kp C_NEXT>, <&kp C_PREV>; - }; - TAP_DANCE(bsls_pipe, &kp BSLH, &kp PIPE) - TAP_DANCE(quot_dquo, &kp SQT, &kp DQT) - TAP_DANCE(cbrkt, &kp LBRC, &kp RBRC) - TAP_DANCE(brkt, &kp LBKT, &kp RBKT) - TAP_DANCE(min_dash, &kp MINUS, &emdash) - }; - - macros { - updir: updir { - label = "UP_DIR"; - compatible = "zmk,behavior-macro"; - #binding-cells = <0>; - bindings = <¯o_tap &kp DOT &kp DOT &kp FSLH>; - }; - emdash: emdash { - label = "EM_DASH"; - compatible = "zmk,behavior-macro"; - #binding-cells = <0>; - bindings = <¯o_press &kp LSHFT &kp LCTRL>, - <¯o_tap &kp U &kp N2 &kp N0 &kp N1 &kp N4>, - <¯o_release &kp LSHFT &kp LCTRL>; - }; - }; - combos { compatible = "zmk,combos"; // name output pos. diff --git a/config/revxlp.keymap b/config/revxlp.keymap index 6a7c5b1..5673fdf 100644 --- a/config/revxlp.keymap +++ b/config/revxlp.keymap @@ -6,10 +6,6 @@ #include <dt-bindings/zmk/bt.h> #include "util.h" -< { - tapping-term-ms = <100>; -}; - / { keymap { compatible = "zmk,keymap"; @@ -39,48 +35,6 @@ }; }; - behaviors { - hm: homerow_mods { - compatible = "zmk,behavior-hold-tap"; - label = "HOMEROW_MODS"; - #binding-cells = <2>; - tapping-term-ms = <130>; - quick-tap-ms = <160>; - flavor = "tap-preferred"; - bindings = <&kp>, <&kp>; - }; - - pnp: play_next_prev { - compatible = "zmk,behavior-tap-dance"; - label = "PLAY_NEXT_PREV"; - #binding-cells = <0>; - tapping-term-ms = <210>; - bindings = <&kp C_PLAY>, <&kp C_NEXT>, <&kp C_PREV>; - }; - TAP_DANCE(bsls_pipe, &kp BSLH, &kp PIPE) - TAP_DANCE(quot_dquo, &kp SQT, &kp DQT) - TAP_DANCE(cbrkt, &kp LBRC, &kp RBRC) - TAP_DANCE(brkt, &kp LBKT, &kp RBKT) - TAP_DANCE(min_dash, &kp MINUS, &emdash) - }; - - macros { - updir: updir { - label = "UP_DIR"; - compatible = "zmk,behavior-macro"; - #binding-cells = <0>; - bindings = <¯o_tap &kp DOT &kp DOT &kp FSLH>; - }; - emdash: emdash { - label = "EM_DASH"; - compatible = "zmk,behavior-macro"; - #binding-cells = <0>; - bindings = <¯o_press &kp LSHFT &kp LCTRL>, - <¯o_tap &kp U &kp N2 &kp N0 &kp N1 &kp N4>, - <¯o_release &kp LSHFT &kp LCTRL>; - }; - }; - combos { compatible = "zmk,combos"; // name output pos. diff --git a/config/splitkb_aurora_sweep.keymap b/config/splitkb_aurora_sweep.keymap index ee9d78a..7dd75a1 100644 --- a/config/splitkb_aurora_sweep.keymap +++ b/config/splitkb_aurora_sweep.keymap @@ -6,10 +6,6 @@ #include <dt-bindings/zmk/bt.h> #include "util.h" -< { - tapping-term-ms = <100>; -}; - / { keymap { compatible = "zmk,keymap"; @@ -38,39 +34,7 @@ >; }; }; - macros { - emdash: emdash { - label = "EM_DASH"; - compatible = "zmk,behavior-macro"; - #binding-cells = <0>; - bindings = <¯o_press &kp LSHFT &kp LCTRL>, - <¯o_tap &kp U &kp N2 &kp N0 &kp N1 &kp N4>, - <¯o_release &kp LSHFT &kp LCTRL>; - }; - }; - behaviors { - hm: homerow_mods { - compatible = "zmk,behavior-hold-tap"; - label = "HOMEROW_MODS"; - #binding-cells = <2>; - tapping-term-ms = <130>; - quick-tap-ms = <160>; - flavor = "tap-preferred"; - bindings = <&kp>, <&kp>; - }; - pnp: play_next_prev { - compatible = "zmk,behavior-tap-dance"; - label = "PLAY_NEXT_PREV"; - #binding-cells = <0>; - tapping-term-ms = <210>; - bindings = <&kp C_PLAY>, <&kp C_NEXT>, <&kp C_PREV>; - }; - TAP_DANCE(bsls_pipe, &kp BSLH, &kp PIPE) - TAP_DANCE(quot_dquo, &kp SQT, &kp DQT) - TAP_DANCE(cbrkt, &kp LBRC, &kp RBRC) - TAP_DANCE(brkt, &kp LBKT, &kp RBKT) - TAP_DANCE(min_dash, &kp MINUS, &emdash) - }; + combos { compatible = "zmk,combos"; // name output pos. diff --git a/config/util.h b/config/util.h index 58a788e..640b1d5 100644 --- a/config/util.h +++ b/config/util.h @@ -19,3 +19,51 @@ td_##name: name { \ #define HRML(k1,k2,k3,k4) &hm LALT k1 &hm LGUI k2 &hm LCTRL k3 &hm LSHFT k4 #define HRMR(k1,k2,k3,k4) &hm RSHFT k1 &hm RCTRL k2 &hm RGUI k3 &hm RALT k4 + +< { + tapping-term-ms = <100>; +}; + +/ { + behaviors { + hm: homerow_mods { + compatible = "zmk,behavior-hold-tap"; + label = "HOMEROW_MODS"; + #binding-cells = <2>; + tapping-term-ms = <130>; + quick-tap-ms = <160>; + flavor = "tap-preferred"; + bindings = <&kp>, <&kp>; + }; + + pnp: play_next_prev { + compatible = "zmk,behavior-tap-dance"; + label = "PLAY_NEXT_PREV"; + #binding-cells = <0>; + tapping-term-ms = <210>; + bindings = <&kp C_PLAY>, <&kp C_NEXT>, <&kp C_PREV>; + }; + TAP_DANCE(bsls_pipe, &kp BSLH, &kp PIPE) + TAP_DANCE(quot_dquo, &kp SQT, &kp DQT) + TAP_DANCE(cbrkt, &kp LBRC, &kp RBRC) + TAP_DANCE(brkt, &kp LBKT, &kp RBKT) + TAP_DANCE(min_dash, &kp MINUS, &emdash) + }; + + macros { + updir: updir { + label = "UP_DIR"; + compatible = "zmk,behavior-macro"; + #binding-cells = <0>; + bindings = <¯o_tap &kp DOT &kp DOT &kp FSLH>; + }; + emdash: emdash { + label = "EM_DASH"; + compatible = "zmk,behavior-macro"; + #binding-cells = <0>; + bindings = <¯o_press &kp LSHFT &kp LCTRL>, + <¯o_tap &kp U &kp N2 &kp N0 &kp N1 &kp N4>, + <¯o_release &kp LSHFT &kp LCTRL>; + }; + }; +}; |