Merge macros and behaviors nodes
Behaviors get identified by `compatible` property (node names are only conventions). No need to place macros inside a separate node.
This commit is contained in:
parent
d8a75b7279
commit
07c88972e7
1 changed files with 33 additions and 36 deletions
|
@ -60,32 +60,6 @@ TODOs and ISSUES
|
||||||
/* root node */
|
/* root node */
|
||||||
/ {
|
/ {
|
||||||
|
|
||||||
macros {
|
|
||||||
// Windows sleep key
|
|
||||||
win_sleep: win_sleep_macro {
|
|
||||||
wait-ms = <50>;
|
|
||||||
tap-ms = <5>;
|
|
||||||
compatible = "zmk,behavior-macro";
|
|
||||||
label = "WIN_SLEEP_MACRO";
|
|
||||||
#binding-cells = <0>;
|
|
||||||
bindings = <&kp LG(X) &kp U &kp S>;
|
|
||||||
};
|
|
||||||
|
|
||||||
// Make sticky shift cancel capsword. Alternatively: mod-morph ss_cw into CANCEL
|
|
||||||
// to cancel capsword without triggering sticky-shift when capsword is active.
|
|
||||||
sticky_shift: sticky_shift_cancel_capsword_macro {
|
|
||||||
wait-ms = <0>;
|
|
||||||
tap-ms = <1>;
|
|
||||||
compatible = "zmk,behavior-macro";
|
|
||||||
label = "STICKY_SHIFT_CANCEL_CAPSWORD_MACRO";
|
|
||||||
#binding-cells = <0>;
|
|
||||||
bindings = <¯o_tap CANCEL> // cancel caps_word;
|
|
||||||
, <¯o_press &sk LSHFT> // then tap sticky-shift and hold
|
|
||||||
, <¯o_pause_for_release> // until key release to enable
|
|
||||||
, <¯o_release &sk LSHFT>; // holding shift
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
behaviors {
|
behaviors {
|
||||||
|
|
||||||
/* homerow mods */
|
/* homerow mods */
|
||||||
|
@ -99,11 +73,11 @@ TODOs and ISSUES
|
||||||
hml: left_hand_home_row_mods {
|
hml: left_hand_home_row_mods {
|
||||||
compatible = "zmk,behavior-hold-tap";
|
compatible = "zmk,behavior-hold-tap";
|
||||||
label = "LEFT_HAND_HOME_ROW_MODS";
|
label = "LEFT_HAND_HOME_ROW_MODS";
|
||||||
#binding-cells = <2>;
|
|
||||||
flavor = "balanced";
|
flavor = "balanced";
|
||||||
tapping-term-ms = <280>;
|
tapping-term-ms = <280>;
|
||||||
quick-tap-ms = <125>;
|
quick-tap-ms = <125>;
|
||||||
global-quick-tap;
|
global-quick-tap;
|
||||||
|
#binding-cells = <2>;
|
||||||
bindings = <&kp>, <&kp>;
|
bindings = <&kp>, <&kp>;
|
||||||
hold-trigger-key-positions = <LHM RHK THK>; // include left-hand HRMs for mod-chaining
|
hold-trigger-key-positions = <LHM RHK THK>; // include left-hand HRMs for mod-chaining
|
||||||
};
|
};
|
||||||
|
@ -111,16 +85,39 @@ TODOs and ISSUES
|
||||||
hmr: right_hand_home_row_mods {
|
hmr: right_hand_home_row_mods {
|
||||||
compatible = "zmk,behavior-hold-tap";
|
compatible = "zmk,behavior-hold-tap";
|
||||||
label = "RIGHT_HAND_HOME_ROW_MODS";
|
label = "RIGHT_HAND_HOME_ROW_MODS";
|
||||||
#binding-cells = <2>;
|
|
||||||
flavor = "balanced";
|
flavor = "balanced";
|
||||||
tapping-term-ms = <280>;
|
tapping-term-ms = <280>;
|
||||||
quick-tap-ms = <125>;
|
quick-tap-ms = <125>;
|
||||||
global-quick-tap;
|
global-quick-tap;
|
||||||
|
#binding-cells = <2>;
|
||||||
bindings = <&kp>, <&kp>;
|
bindings = <&kp>, <&kp>;
|
||||||
hold-trigger-key-positions = <RHM LHK THK>; // include right-hand HRMs for mod-chaining
|
hold-trigger-key-positions = <RHM LHK THK>; // include right-hand HRMs for mod-chaining
|
||||||
};
|
};
|
||||||
|
|
||||||
/* custom keys */
|
/* custom keys and macros */
|
||||||
|
|
||||||
|
// sticky-shift that cancels capsword (used in ss_cw below). Alternatively: mod-morph ss_cw into CANCEL to swallow sticky-shift when capsword is active
|
||||||
|
sticky_shift: sticky_shift_cancel_capsword_macro {
|
||||||
|
compatible = "zmk,behavior-macro";
|
||||||
|
label = "STICKY_SHIFT_CANCEL_CAPSWORD_MACRO";
|
||||||
|
wait-ms = <0>;
|
||||||
|
tap-ms = <1>;
|
||||||
|
#binding-cells = <0>;
|
||||||
|
bindings = <¯o_tap CANCEL> // cancel caps_word;
|
||||||
|
, <¯o_press &sk LSHFT> // then tap sticky-shift and hold
|
||||||
|
, <¯o_pause_for_release> // until key release to enable
|
||||||
|
, <¯o_release &sk LSHFT>; // holding shift
|
||||||
|
};
|
||||||
|
|
||||||
|
// tap: sticky shift | double tap: capsword | triple tap: cancel capsword
|
||||||
|
ss_cw: sticky_shift_capsword_key {
|
||||||
|
compatible = "zmk,behavior-tap-dance";
|
||||||
|
label = "STICKY_SHIFT_CAPSWORD_KEY";
|
||||||
|
tapping-term-ms = <200>;
|
||||||
|
#binding-cells = <0>;
|
||||||
|
// bindings = <&sticky_shift>, <&caps_word>, <CANCEL>;
|
||||||
|
bindings = <&sk LSHFT>, <&caps_word>, <CANCEL>;
|
||||||
|
};
|
||||||
|
|
||||||
// tap: backspace | lshft + tap: delete | rshft + tap: shift-delete | hold: num layer
|
// tap: backspace | lshft + tap: delete | rshft + tap: shift-delete | hold: num layer
|
||||||
bs_del_num: backspace_del_num_key {
|
bs_del_num: backspace_del_num_key {
|
||||||
|
@ -132,14 +129,14 @@ TODOs and ISSUES
|
||||||
masked_mods = <MOD_LSFT>; // requires PR #1114
|
masked_mods = <MOD_LSFT>; // requires PR #1114
|
||||||
};
|
};
|
||||||
|
|
||||||
// tap: sticky shift | double tap: capsword | triple tap: cancel capsword
|
// Windows sleep key
|
||||||
ss_cw: sticky_shift_capsword_key {
|
win_sleep: win_sleep_macro {
|
||||||
compatible = "zmk,behavior-tap-dance";
|
compatible = "zmk,behavior-macro";
|
||||||
label = "STICKY_SHIFT_CAPSWORD_KEY";
|
label = "WIN_SLEEP_MACRO";
|
||||||
|
wait-ms = <50>;
|
||||||
|
tap-ms = <5>;
|
||||||
#binding-cells = <0>;
|
#binding-cells = <0>;
|
||||||
tapping-term-ms = <200>;
|
bindings = <&kp LG(X) &kp U &kp S>;
|
||||||
// bindings = <&sticky_shift>, <&caps_word>, <CANCEL>;
|
|
||||||
bindings = <&sk LSHFT>, <&caps_word>, <CANCEL>;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue