Skip to content

Commit

Permalink
adaptive e
Browse files Browse the repository at this point in the history
  • Loading branch information
englmaxi authored Sep 15, 2024
1 parent 2982987 commit 1ef1573
Show file tree
Hide file tree
Showing 3 changed files with 48 additions and 10 deletions.
38 changes: 33 additions & 5 deletions config/keymap/behaviors.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -27,20 +27,28 @@
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";
Expand Down Expand Up @@ -204,7 +212,27 @@
defaults = <&kp U>;
bindings = <&kp DE_EQUAL>, <&kp DE_EQUAL>;
antecedents = <DE_LT DE_GT>;
max-delay-ms = <250>;
max-delay-ms = <280>;
};

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

ad_e: adaptive_e {
compatible = "zmk,behavior-antecedent-morph";
label = "ADAPTIVE_A";
#binding-cells = <0>;
defaults = <&kp E>;
bindings = <&kp DE_GT>, <&kp DE_GT>;
antecedents = <DE_MINUS DE_EQUAL>;
max-delay-ms = <280>;
};
};
};
4 changes: 2 additions & 2 deletions config/keymap/keymap.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,9 @@
// ├─────────────┼─────────────┼─────────────────┼──────────────────┼──────────────┤ ├─────────────┼─────────────────┼─────────────────┼─────────────────┼─────────────┤
&hml LGUI R, &hml LALT S, &hml_hwu LCTRL T, &hml_hwu LSHIFT H, &kp K, &kp X, &hmr_hwu RSHFT N, &hmr_hwu RCTRL A, &hmr LALT I, &hmr LGUI O, \
// ├─────────────┼─────────────┼─────────────────┼──────────────────┼──────────────┤ ├─────────────┼─────────────────┼─────────────────┼─────────────────┼─────────────┤
&kp DE_Z, &hml RALT C, &kp G, &kp D, &kp Q, &key_repeat, &kp M, &kp DE_COMMA, &hmr RALT DE_DOT, &qexcl, \
&kp DE_Z, &hml RALT C, &kp G, &kp D, &kp Q, &key_repeat, &kp M, &ad_comma, &hmr RALT DE_DOT, &qexcl, \
// ╰─────────────┴─────────────┴─────────────────┼──────────────────┼──────────────┤ ├─────────────┼─────────────────┼─────────────────┴─────────────────┴─────────────╯
&bspc_del, &lt NAV SPACE, &lt NUM E, &qt_grv \
&bspc_del, &lt NAV SPACE, &lt_e NUM E, &qt_grv \
// ╰─────────────────┴──────────────╯ ╰─────────────┴─────────────────╯
)>;
};
Expand Down
16 changes: 13 additions & 3 deletions keymap-drawer/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,10 @@ parse_config:
'&kp DE_COMMA':
tap: ','
shifted: ';'

'&ad_comma':
tap: ','
shifted: ';'

'&kp DE_DOT':
tap: '.'
Expand All @@ -115,6 +119,12 @@ parse_config:
'&ht_qu Q 0':
tap: 'QU'
hold: 'Q'

#'&lt_e NUM E':
# tap: 'E'
# hold: 'NUM'

'&ad_e': 'E'

'&out OUT_BLE': $$mdi:bluetooth$$
'&out OUT_USB': $$mdi:usb$$
Expand Down Expand Up @@ -271,9 +281,9 @@ parse_config:
LC(DE_Y): $$mdi:redo$$
LC(LS(DE_Z)): $$mdi:redo$$

LC(A)': $$mdi:select-all$$
LC(F)': $$mdi:text-search$$
LC(W)': $$mdi:close-box-outline$$
LC(A): $$mdi:select-all$$
LC(F): $$mdi:text-search$$
LC(W): $$mdi:close-box-outline$$
LA(F4)': $$mdi:close-box-outline$$

LC(DE_PLUS)': $$mdi:magnify-plus-outline$$
Expand Down

0 comments on commit 1ef1573

Please sign in to comment.