Skip to content

Commit

Permalink
Keymap update
Browse files Browse the repository at this point in the history
  • Loading branch information
englmaxi committed Sep 15, 2024
1 parent 1716ce6 commit 77fed40
Show file tree
Hide file tree
Showing 12 changed files with 570 additions and 311 deletions.
82 changes: 74 additions & 8 deletions config/keymap/behaviors.dtsi
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
#include <behaviors.dtsi>
#include <behaviors/rgbled_widget.dtsi>

// overwrites
&caps_word {
continue-list = <BACKSPACE DELETE DE_UNDER DE_MINUS>;
Expand All @@ -15,7 +18,6 @@

&lt {
flavor = "balanced";
quick-tap-ms = <220>;
};


Expand All @@ -25,21 +27,29 @@
lt_del: layer_tap_del {
compatible = "zmk,behavior-hold-tap";
#binding-cells = <2>;
flavor = "tap-preferred";
tapping-term-ms = <200>;
flavor = "balanced";
tapping-term-ms = <220>;
quick-tap-ms = <220>;
bindings = <&mo>, <&bspc_del>;
};

lt_qt: layer_tap_qt {
compatible = "zmk,behavior-hold-tap";
#binding-cells = <2>;
flavor = "tap-preferred";
tapping-term-ms = <200>;
flavor = "balanced";
tapping-term-ms = <220>;
quick-tap-ms = <220>;
bindings = <&mo>, <&qt_grv>;
};

lt_e: layer_tap_ad_e {
compatible = "zmk,behavior-hold-tap";
#binding-cells = <2>;
flavor = "balanced";
tapping-term-ms = <220>;
bindings = <&mo>, <&ad_e>;
};

ht_qu: hold_tap_qu {
compatible = "zmk,behavior-hold-tap";
#binding-cells = <2>;
Expand Down Expand Up @@ -70,6 +80,7 @@
behaviors {
HM(hml, &kp, KEYS_R)
HM(hml_hwu, &kp, KEYS_R, hold-while-undecided;)
HM(hml_m, &mkp, KEYS_R)
HM(hmr, &kp, KEYS_L)
HM(hmr_hwu, &kp, KEYS_L, hold-while-undecided;)
};
Expand Down Expand Up @@ -128,8 +139,8 @@
SM(rbrc_gt, &kp DE_RBRC, &kp DE_GT)
SM(brc_lgt, &brc_macro, &lgt_macro)

GM(p_tab_desk, &kp LC(LS(TAB)), &kp LC(LG(LEFT)))
GM(n_tab_desk, &kp LC(TAB), &kp LC(LG(RIGHT)))
SM(p_tab_desk, &kp LC(LS(TAB)), &kp LC(LG(LEFT)))
SM(n_tab_desk, &kp LC(TAB), &kp LC(LG(RIGHT)))

MASKED(left_masked, (MOD_RSFT|MOD_LSFT), &kp LEFT)
MASKED(u_masked, (MOD_RSFT|MOD_LSFT), &kp U)
Expand All @@ -155,19 +166,74 @@
TD(bts_2, &bts 2, &bt BT_DISC 2)

TD(kns_lock, &kp CLCK, &kp KP_NLCK, &kp SLCK)

TD(pp_n, &kp C_PP, &kp C_NEXT)

TD(close_reopen, &mt LA(F4) LC(W), &kp LC(LS(T)))

};
};


// swapper
// tri-state
/ {
behaviors {
alt_tabber: swapper {
compatible = "zmk,behavior-tri-state";
#binding-cells = <0>;
bindings = <&kt LALT>, <&kp TAB>, <&kt LALT>;
ignored-key-positions = <RT2 RM1 RM2 RM3>; // arrow keys
timeout-ms = <5000>;
};
};

behaviors {
sel_word: sel_word {
compatible = "zmk,behavior-tri-state";
#binding-cells = <0>;
bindings = <&sel_word_base>, <&kp LS(LC(RIGHT))>, <&none>;
tap-ms = <0>;
};
};

behaviors {
sel_line: sel_line {
compatible = "zmk,behavior-tri-state";
#binding-cells = <0>;
bindings = <&sel_line_base>, <&sel_line_next>, <&none>;
tap-ms = <0>;
};
};
};

// antecedent-morph
/ {
behaviors {
ad_u: adaptive_u {
compatible = "zmk,behavior-antecedent-morph";
#binding-cells = <0>;
defaults = <&kp U>;
bindings = <&kp DE_EQUAL>, <&kp DE_EQUAL>;
antecedents = <DE_LT DE_GT>;
max-delay-ms = <1000>;
};

ad_comma: adaptive_comma {
compatible = "zmk,behavior-antecedent-morph";
#binding-cells = <0>;
defaults = <&kp DE_COMMA>;
bindings = <&kp DE_EQUAL>;
antecedents = <DE_EXCL>;
max-delay-ms = <1000>;
};

ad_e: adaptive_e {
compatible = "zmk,behavior-antecedent-morph";
#binding-cells = <0>;
defaults = <&kp E>;
bindings = <&kp DE_GT>, <&kp DE_GT>, <&kp DE_GT>;
antecedents = <DE_MINUS DE_EQUAL DE_PIPE>;
max-delay-ms = <1000>;
};
};
};
14 changes: 8 additions & 6 deletions config/keymap/combos.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@
bindings = <BINDINGS>; \
key-positions = <KEYPOS>; \
layers = <LAYERS>; \
require-prior-idle-ms = <150>; \
__VA_ARGS__ \
require-prior-idle-ms = <150>; \
__VA_ARGS__ \
};

#define COMBO_TERM_FAST 30
Expand Down Expand Up @@ -61,11 +61,11 @@
COMBO(bslh, &kp DE_BSLH, LM2 LB2 , DEF, COMBO_TERM_FAST)
COMBO(euro, &kp DE_EURO, LM3 LB3 , DEF, COMBO_TERM_FAST)

COMBO(plus, &kp DE_PLUS, RT1 RM1 , DEF, COMBO_TERM_FAST)
COMBO(star, &kp DE_STAR, RT2 RM2 , DEF, COMBO_TERM_FAST)
COMBO(plus, &kp DE_PLUS, RT1 RM1 , DEF NUM, COMBO_TERM_FAST)
COMBO(star, &kp DE_STAR, RT2 RM2 , DEF NUM, COMBO_TERM_FAST)
COMBO(amps, &kp DE_AMPS, RT3 RM3 , DEF, COMBO_TERM_FAST)
COMBO(minus, &kp DE_MINUS, RM1 RB1 , DEF, COMBO_TERM_FAST)
COMBO(fslh, &kp DE_FSLH, RM2 RB2 , DEF, COMBO_TERM_FAST)
COMBO(minus, &kp DE_MINUS, RM1 RB1 , DEF NUM, COMBO_TERM_FAST)
COMBO(fslh, &kp DE_FSLH, RM2 RB2 , DEF NUM, COMBO_TERM_FAST)
COMBO(pipe, &kp DE_PIPE, RM3 RB3 , DEF, COMBO_TERM_FAST)

COMBO(z, &kp DE_Z, LB3 LB2 , DEF, COMBO_TERM_MID)
Expand Down Expand Up @@ -93,5 +93,7 @@

COMBO(undo, &kp U_UND, LB3 LB2 , NAV, COMBO_TERM_MID)
COMBO(redo, &kp U_RDO, LB2 LB1 , NAV, COMBO_TERM_MID)

COMBO(mute, &kp C_MUTE, LT3 LT2 , NUM, COMBO_TERM_MID)
};
};
Loading

0 comments on commit 77fed40

Please sign in to comment.