/* * Copyright (c) 2020 The ZMK Contributors * * SPDX-License-Identifier: MIT */ #include #include #include #include "zmk-helpers/helper.h" #include "zmk-helpers/key-labels/42.h" &sk { // sticky-key config release-after-ms = <900>; // release after 0.9s quick-release; // no double capitalization when rolling keys }; // tap: sticky-shift | shift + tap/ double-tap: caps-word | hold: shift ZMK_MOD_MORPH(smart_shft, bindings = <&sk LSHFT>, <&caps_word>; mods = <(MOD_LSFT)>; ) ZMK_BEHAVIOR(long_sk, sticky_key, bindings = <&kp>; quick-release; release-after-ms = <2000>; ) ZMK_HOLD_TAP(ht_sk, flavor = "hold-preferred"; bindings = <&kp>, <&long_sk>; tapping-term-ms = <200>; ) ZMK_MOD_MORPH(smart_mod, bindings = <&ht_sk LALT LGUI>, <&kp LGUI>; mods = <(MOD_LSFT)>; ) // deprecrstated, unused ZMK_TAP_DANCE(alt_mod, bindings = <&ht_sk LALT LGUI>, <&kp LGUI>; ) ZMK_HOLD_TAP(ht_mo, flavor = "hold-preferred"; tapping-term-ms = <200>; /* quick-tap-ms = <200>; */ /* require-prior-idle-ms = <125>; */ bindings = <&mo>, <&kp>; ) &caps_word { // mods deactivate caps-word, requires PR #1451 /delete-property/ ignore-modifiers; }; / { behaviors { rpi: require_prior_idle { compatible = "zmk,behavior-hold-tap"; #binding-cells = <2>; flavor = "tap-preferred"; tapping-term-ms = <200>; quick-tap-ms = <200>; require-prior-idle-ms = <125>; bindings = <&kp>, <&kp>; }; }; conditional_layers { compatible = "zmk,conditional-layers"; meta_layer { if-layers = <1 2>; then-layer = <3>; }; }; keymap { compatible = "zmk,keymap"; default_layer { display-name = "base"; bindings = < // ┌──────┬───┬───┬────────────┬───────────────────────┬─────────────┐ ┌─────────────┬──────────────┬──────┬───┬───┬────────────┐ // │ esc │ Q │ W │ F │ P │ B │ │ J │ L │ U │ Y │ ; │ lctl(lsft) │ // ├──────┼───┼───┼────────────┼───────────────────────┼─────────────┤ ├─────────────┼──────────────┼──────┼───┼───┼────────────┤ // │ bspc │ A │ R │ S │ T │ G │ │ M │ N │ E │ I │ O │ ' │ // ├──────┼───┼───┼────────────┼───────────────────────┼─────────────┤ ├─────────────┼──────────────┼──────┼───┼───┼────────────┤ // │ lsft │ Z │ X │ C │ D │ V │ │ K │ H │ , │ . │ / │ lalt │ // └──────┴───┴───┼────────────┼───────────────────────┼─────────────┤ ├─────────────┼──────────────┼──────┼───┴───┴────────────┘ // │ &smart_mod │ &rpi left_CONTROL spc │ &smart_shft │ │ &smart_shft │ &ht_mo 2 ent │ mo 1 │ // └────────────┴───────────────────────┴─────────────┘ └─────────────┴──────────────┴──────┘ &kp ESC &kp Q &kp W &kp F &kp P &kp B &kp J &kp L &kp U &kp Y &kp SEMICOLON &kp LC(LSHFT) &kp BSPC &kp A &kp R &kp S &kp T &kp G &kp M &kp N &kp E &kp I &kp O &kp SQT &kp LSHFT &kp Z &kp X &kp C &kp D &kp V &kp K &kp H &kp COMMA &kp DOT &kp FSLH &kp LALT &smart_mod &rpi LEFT_CONTROL SPACE &smart_shft &smart_shft &ht_mo 2 ENTER &mo 1 >; }; symbol { display-name = "symbol"; bindings = < // ┌─────┬───┬───┬─────┬─────┬─────┐ ┌─────┬─────┬─────┬───┬───┬─────┐ // │ │ @ │ ! │ ( │ ) │ │ │ │ & │ * │ = │ : │ │ // ├─────┼───┼───┼─────┼─────┼─────┤ ├─────┼─────┼─────┼───┼───┼─────┤ // │ │ ^ │ - │ { │ } │ ~ │ │ ^ │ < │ > │ $ │ | │ │ // ├─────┼───┼───┼─────┼─────┼─────┤ ├─────┼─────┼─────┼───┼───┼─────┤ // │ │ % │ _ │ [ │ ] │ │ │ │ # │ ` │ + │ \ │ │ // └─────┴───┴───┼─────┼─────┼─────┤ ├─────┼─────┼─────┼───┴───┴─────┘ // │ │ │ │ │ │ │ │ // └─────┴─────┴─────┘ └─────┴─────┴─────┘ &trans &kp AT &kp EXCL &kp LEFT_PARENTHESIS &kp RIGHT_PARENTHESIS &trans &trans &kp AMPS &kp STAR &kp EQUAL &kp COLON &trans &trans &kp CARET &kp MINUS &kp LEFT_BRACE &kp RIGHT_BRACE &kp TILDE &kp CARET &kp LT &kp GT &kp DOLLAR &kp PIPE &trans &trans &kp PERCENT &kp UNDER &kp LEFT_BRACKET &kp RIGHT_BRACKET &trans &trans &kp HASH &kp GRAVE &kp PLUS &kp BSLH &trans &trans &trans &trans &trans &trans &trans >; }; nav { display-name = "nav"; bindings = < // ┌─────┬─────┬─────┬─────┬─────┬─────┐ ┌──────┬──────┬─────┬──────┬─────┬─────┐ // │ │ 6 │ 7 │ 8 │ 9 │ 0 │ │ │ │ │ │ │ │ // ├─────┼─────┼─────┼─────┼─────┼─────┤ ├──────┼──────┼─────┼──────┼─────┼─────┤ // │ 0 │ 1 │ 2 │ 3 │ 4 │ 5 │ │ left │ down │ up │ rght │ │ │ // ├─────┼─────┼─────┼─────┼─────┼─────┤ ├──────┼──────┼─────┼──────┼─────┼─────┤ // │ │ │ │ esc │ tab │ │ │ │ │ │ │ │ │ // └─────┴─────┴─────┼─────┼─────┼─────┤ ├──────┼──────┼─────┼──────┴─────┴─────┘ // │ │ │ │ │ │ │ │ // └─────┴─────┴─────┘ └──────┴──────┴─────┘ &trans &kp N6 &kp N7 &kp N8 &kp N9 &kp N0 &trans &trans &trans &trans &trans &trans &kp N0 &kp N1 &kp N2 &kp N3 &kp N4 &kp N5 &kp LEFT &kp DOWN &kp UP &kp RIGHT &trans &trans &trans &trans &trans &kp ESC &kp TAB &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans >; }; meta_layer { display-name = "meta"; bindings = < // ┌────────┬────────┬────────┬─────┬─────┬─────┐ ┌─────┬─────┬─────┬─────┬─────┬─────┐ // │ bt_clr │ bt_nxt │ bt_prv │ │ │ │ │ │ │ │ │ │ │ // ├────────┼────────┼────────┼─────┼─────┼─────┤ ├─────┼─────┼─────┼─────┼─────┼─────┤ // │ │ │ │ │ │ │ │ │ │ │ │ │ │ // ├────────┼────────┼────────┼─────┼─────┼─────┤ ├─────┼─────┼─────┼─────┼─────┼─────┤ // │ │ │ │ │ │ │ │ │ │ │ │ │ │ // └────────┴────────┴────────┼─────┼─────┼─────┤ ├─────┼─────┼─────┼─────┴─────┴─────┘ // │ │ │ │ │ │ │ │ // └─────┴─────┴─────┘ └─────┴─────┴─────┘ &bt BT_CLR &bt BT_NXT &bt BT_PRV &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans >; }; }; };