Skip to content

Commit

Permalink
move common configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
waffle87 committed Feb 25, 2024
1 parent f77ce1e commit c06a8f9
Show file tree
Hide file tree
Showing 4 changed files with 49 additions and 129 deletions.
46 changes: 0 additions & 46 deletions config/corne.keymap
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,6 @@
#include <dt-bindings/zmk/bt.h>
#include "util.h"

&lt {
tapping-term-ms = <100>;
};

/ {
keymap {
compatible = "zmk,keymap";
Expand Down Expand Up @@ -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 = <&macro_tap &kp DOT &kp DOT &kp FSLH>;
};
emdash: emdash {
label = "EM_DASH";
compatible = "zmk,behavior-macro";
#binding-cells = <0>;
bindings = <&macro_press &kp LSHFT &kp LCTRL>,
<&macro_tap &kp U &kp N2 &kp N0 &kp N1 &kp N4>,
<&macro_release &kp LSHFT &kp LCTRL>;
};
};

combos {
compatible = "zmk,combos";
// name output pos.
Expand Down
46 changes: 0 additions & 46 deletions config/revxlp.keymap
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,6 @@
#include <dt-bindings/zmk/bt.h>
#include "util.h"

&lt {
tapping-term-ms = <100>;
};

/ {
keymap {
compatible = "zmk,keymap";
Expand Down Expand Up @@ -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 = <&macro_tap &kp DOT &kp DOT &kp FSLH>;
};
emdash: emdash {
label = "EM_DASH";
compatible = "zmk,behavior-macro";
#binding-cells = <0>;
bindings = <&macro_press &kp LSHFT &kp LCTRL>,
<&macro_tap &kp U &kp N2 &kp N0 &kp N1 &kp N4>,
<&macro_release &kp LSHFT &kp LCTRL>;
};
};

combos {
compatible = "zmk,combos";
// name output pos.
Expand Down
38 changes: 1 addition & 37 deletions config/splitkb_aurora_sweep.keymap
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,6 @@
#include <dt-bindings/zmk/bt.h>
#include "util.h"

&lt {
tapping-term-ms = <100>;
};

/ {
keymap {
compatible = "zmk,keymap";
Expand Down Expand Up @@ -38,39 +34,7 @@
>;
};
};
macros {
emdash: emdash {
label = "EM_DASH";
compatible = "zmk,behavior-macro";
#binding-cells = <0>;
bindings = <&macro_press &kp LSHFT &kp LCTRL>,
<&macro_tap &kp U &kp N2 &kp N0 &kp N1 &kp N4>,
<&macro_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.
Expand Down
48 changes: 48 additions & 0 deletions config/util.h
Original file line number Diff line number Diff line change
Expand Up @@ -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

&lt {
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 = <&macro_tap &kp DOT &kp DOT &kp FSLH>;
};
emdash: emdash {
label = "EM_DASH";
compatible = "zmk,behavior-macro";
#binding-cells = <0>;
bindings = <&macro_press &kp LSHFT &kp LCTRL>,
<&macro_tap &kp U &kp N2 &kp N0 &kp N1 &kp N4>,
<&macro_release &kp LSHFT &kp LCTRL>;
};
};
};

0 comments on commit c06a8f9

Please sign in to comment.