diff --git a/config/base.keymap b/config/base.keymap index f8adfb3..bce8dad 100644 --- a/config/base.keymap +++ b/config/base.keymap @@ -52,7 +52,7 @@ #define THUMBS LH2 LH1 LH0 RH0 RH1 RH2 // thumbs #define MAKE_HRM(NAME, HOLD, TAP, TRIGGER_POS) \ - ZMK_BEHAVIOR(NAME, hold_tap, \ + ZMK_HOLD_TAP(NAME, \ flavor = "balanced"; \ tapping-term-ms = <280>; \ quick-tap-ms = ; \ @@ -78,8 +78,8 @@ MAKE_HRM(hmr_rpar_gt, &kp, &rpar_gt, KEYS_L THUMBS) // " " " " hold-trigger-key-positions = <0>; &mt { MT_CORE }; -ZMK_BEHAVIOR(mt_home, hold_tap, bindings = <&masked_home>, <&kp>; MT_CORE) -ZMK_BEHAVIOR(mt_end, hold_tap, bindings = <&masked_end>, <&kp>; MT_CORE) +ZMK_HOLD_TAP(mt_home, bindings = <&masked_home>, <&kp>; MT_CORE) +ZMK_HOLD_TAP(mt_end, bindings = <&masked_end>, <&kp>; MT_CORE) #define NAV_LEFT &mt_home 0 LEFT // tap: left | long-tap: beginning of line #define NAV_RIGHT &mt_end 0 RIGHT // tap: right | long-tap: end of line @@ -90,7 +90,7 @@ ZMK_BEHAVIOR(mt_end, hold_tap, bindings = <&masked_end>, <&kp>; MT_CORE) // mask CTRL when holding left/right to avoid accidental jumps to beginning/end of document #define MASK_MODS(NAME, MODS, BINDING) \ - ZMK_BEHAVIOR(NAME, mod_morph, \ + ZMK_MOD_MORPH(NAME, \ bindings = , ; \ mods = ; \ ) @@ -100,7 +100,7 @@ MASK_MODS(masked_end, (MOD_LCTL), &kp END) /* Caps-word, num-word and smart-mouse */ // tap: sticky-shift | shift + tap/ double-tap: caps-word | hold: shift -ZMK_BEHAVIOR(smart_shft, mod_morph, +ZMK_MOD_MORPH(smart_shft, bindings = <&sk LSHFT>, <&caps_word>; mods = <(MOD_LSFT)>; ) @@ -110,13 +110,13 @@ ZMK_BEHAVIOR(smart_shft, mod_morph, // tap: num-word | double-tap: sticky num-layer | hold: num-layer #define SMART_NUM &smart_num NUM 0 -ZMK_BEHAVIOR(smart_num, hold_tap, +ZMK_HOLD_TAP(smart_num, flavor = "balanced"; tapping-term-ms = <200>; quick-tap-ms = ; bindings = <&mo>, <&num_dance>; ) -ZMK_BEHAVIOR(num_dance, tap_dance, +ZMK_TAP_DANCE(num_dance, tapping-term-ms = <200>; bindings = <&num_word>, <&sl NUM>; // reverse this for sticky-num on single tap ) @@ -126,7 +126,7 @@ ZMK_BEHAVIOR(num_dance, tap_dance, }; // smart-mouse, requires PR #1366 -ZMK_BEHAVIOR(smart_mouse, tri_state, +ZMK_TRI_STATE(smart_mouse, bindings = <&tog MOUSE>, <&none>, <&tog MOUSE>; ignored-key-positions = ; ignored-layers = ; @@ -135,18 +135,18 @@ ZMK_BEHAVIOR(smart_mouse, tri_state, /* Custom behaviors */ // Alt+Tab swapper, requires PR #1366 -ZMK_BEHAVIOR(swapper, tri_state, +ZMK_TRI_STATE(swapper, bindings = <&kt LALT>, <&kp TAB>, <&kt LALT>; ignored-key-positions = ; ) // Sticky layer + sticky shift (workaround for issue #1421) -ZMK_BEHAVIOR(sls, sticky_key, +ZMK_STICKY_KEY(sls, release-after-ms = <1000>; bindings = <&uc_shift>; ignore-modifiers; ) -ZMK_BEHAVIOR(uc_shift, macro, +ZMK_MACRO(uc_shift, wait-ms = <0>; tap-ms = <1>; bindings = <¯o_press &mo UC &kp LSHFT> @@ -156,7 +156,7 @@ ZMK_BEHAVIOR(uc_shift, macro, // reuse basic mod-morph scheme #define SIMPLE_MORPH(NAME, MOD, BINDING1, BINDING2) \ - ZMK_BEHAVIOR(NAME, mod_morph, \ + ZMK_MOD_MORPH(NAME, \ mods = <(MOD_L ## MOD|MOD_R ## MOD)>; \ bindings = , ; \ ) @@ -177,34 +177,34 @@ SIMPLE_MORPH(lpar_lt, SFT, &kp LPAR, &kp LT) SIMPLE_MORPH(rpar_gt, SFT, &kp RPAR, &kp GT) // tap: space | shift + tap: dot -> space -> sticky shift | hold: activate layer -ZMK_BEHAVIOR(lt_spc, hold_tap, +ZMK_HOLD_TAP(lt_spc, flavor = "balanced"; tapping-term-ms = <200>; quick-tap-ms = ; bindings = <&mo>, <&spc_morph>; ) SIMPLE_MORPH(spc_morph, SFT, &kp SPACE, &dot_spc) -ZMK_BEHAVIOR(dot_spc, macro, +ZMK_MACRO(dot_spc, wait-ms = <0>; tap-ms = <5>; bindings = <&kp DOT &kp SPACE &sk LSHFT>; ) // tap: backspace | lshft + tap: delete | rshft + tap: shift-delete -ZMK_BEHAVIOR(bs_del, mod_morph, +ZMK_MOD_MORPH(bs_del, bindings = <&kp BSPC>, <&kp DEL>; mods = <(MOD_LSFT|MOD_RSFT)>; keep-mods = ; ) // tap: copy | double-tap: cut -ZMK_BEHAVIOR(copy_cut, tap_dance, +ZMK_TAP_DANCE(copy_cut, tapping-term-ms = <200>; bindings = <&kp LC(INS)>, <&kp LC(X)>; ) // Windows sleep key -ZMK_BEHAVIOR(win_sleep, macro, +ZMK_MACRO(win_sleep, wait-ms = <500>; tap-ms = <50>; bindings = <&kp LG(X) &kp U &kp S>;