Skip to content

Commit

Permalink
Update behaviours_other.dtsi
Browse files Browse the repository at this point in the history
  • Loading branch information
jr5x1 authored Jun 22, 2024
1 parent 6d8bb2d commit 727edd6
Showing 1 changed file with 36 additions and 0 deletions.
36 changes: 36 additions & 0 deletions config/includes/behaviours_other.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -281,4 +281,40 @@
bindings = <&mo>, <&kp>;
};
};

/* Caps-word, num-word and smart-mouse FROM UROB'S CONFIG */

// tap: sticky-shift | shift + tap/ double-tap: caps-word | hold: shift
ZMK_MOD_MORPH(smart_shft,
bindings = <&sk LSHFT>, <&caps_word>;
mods = <(MOD_LSFT)>;
)
&caps_word { // mods deactivate caps-word, requires PR #1451
/delete-property/ ignore-modifiers;
};

// tap: num-word | double-tap: sticky num-layer | hold: num-layer
#define SMART_NUM &smart_num NUM 0
ZMK_HOLD_TAP(smart_num,
flavor = "balanced";
tapping-term-ms = <200>;
quick-tap-ms = <QUICK_TAP_MS>;
bindings = <&mo>, <&num_dance>;
)
ZMK_TAP_DANCE(num_dance,
tapping-term-ms = <200>;
bindings = <&num_word>, <&sl NUM>; // reverse this for sticky-num on single tap
)
&num_word { // num-word, requires PR #1451
layers = <NUM>;
continue-list = <BSPC DEL DOT COMMA PLUS MINUS STAR FSLH EQUAL>;
};

// smart-mouse, requires PR #1366
ZMK_TRI_STATE(smart_mouse,
bindings = <&tog MOUSE>, <&none>, <&tog MOUSE>;
ignored-key-positions = <LT1 LT3 RT0 RT1 RT2 RT3 RT4 RM1 RM2 RM3 RB1 RB2 RB3 RH0 RH1>;
ignored-layers = <MOUSE>;
)

};

0 comments on commit 727edd6

Please sign in to comment.