From 1ef1573cdea164be6c938ee1eb08fa4f27d00b00 Mon Sep 17 00:00:00 2001 From: Maximilian Engl <43675074+englmaxi@users.noreply.github.com> Date: Sun, 15 Sep 2024 15:31:01 +0200 Subject: [PATCH] adaptive e --- config/keymap/behaviors.dtsi | 38 +++++++++++++++++++++++++++++++----- config/keymap/keymap.dtsi | 4 ++-- keymap-drawer/config.yaml | 16 ++++++++++++--- 3 files changed, 48 insertions(+), 10 deletions(-) diff --git a/config/keymap/behaviors.dtsi b/config/keymap/behaviors.dtsi index 6954031..a4c7aad 100644 --- a/config/keymap/behaviors.dtsi +++ b/config/keymap/behaviors.dtsi @@ -27,8 +27,8 @@ 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>; }; @@ -36,11 +36,19 @@ 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"; @@ -204,7 +212,27 @@ defaults = <&kp U>; bindings = <&kp DE_EQUAL>, <&kp DE_EQUAL>; antecedents = ; - 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 = ; + 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 = ; + max-delay-ms = <280>; }; }; }; diff --git a/config/keymap/keymap.dtsi b/config/keymap/keymap.dtsi index a53810f..557c113 100644 --- a/config/keymap/keymap.dtsi +++ b/config/keymap/keymap.dtsi @@ -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, < NAV SPACE, < NUM E, &qt_grv \ + &bspc_del, < NAV SPACE, <_e NUM E, &qt_grv \ // ╰─────────────────┴──────────────╯ ╰─────────────┴─────────────────╯ )>; }; diff --git a/keymap-drawer/config.yaml b/keymap-drawer/config.yaml index 83a4ff8..1295e0a 100644 --- a/keymap-drawer/config.yaml +++ b/keymap-drawer/config.yaml @@ -107,6 +107,10 @@ parse_config: '&kp DE_COMMA': tap: ',' shifted: ';' + + '&ad_comma': + tap: ',' + shifted: ';' '&kp DE_DOT': tap: '.' @@ -115,6 +119,12 @@ parse_config: '&ht_qu Q 0': tap: 'QU' hold: 'Q' + + #'<_e NUM E': + # tap: 'E' + # hold: 'NUM' + + '&ad_e': 'E' '&out OUT_BLE': $$mdi:bluetooth$$ '&out OUT_USB': $$mdi:usb$$ @@ -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$$