ZMK_CONDITIONAL_LAYER count limit? #53
-
I may be pushing this past practical, but the helper macro for ZMK_CONDITIONAL_LAYER doesn't work with multiple layers, (I have 12 with the default method). Is there something that would limit the number of conditional layers? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 3 replies
-
Can you share a config? There is virtually no difference between the helper macro and the default method, so I don't see why there should be a difference. |
Beta Was this translation helpful? Give feedback.
-
My current theory is that the "tri_layer" label in the macro is being overwritten with each call of the macro. Does the label need to be unique for each conditional layer? This macro and config is working for me now: #define ZMK_CONDITIONAL_LAYER(if_name, if_layers, then_layer) \
/ { \
conditional_layers { \
compatible = "zmk,conditional-layers"; \
if_name { \
if-layers = <if_layers>; \
then-layer = <then_layer>; \
}; \
}; \
};
/* Keymap */
ZMK_CONDITIONAL_LAYER(realspace_layer, SDL SUL, RSL)
ZMK_CONDITIONAL_LAYER(adjust_layer, LWL REL, AJL)
ZMK_CONDITIONAL_LAYER(subspace_layer, SDL LWL, SSL)
ZMK_CONDITIONAL_LAYER(hyperspace_layer, SUL REL, HSL)
ZMK_CONDITIONAL_LAYER(knownspace_layer, SDL REL, KSL)
ZMK_CONDITIONAL_LAYER(cyberspace_layer, LWL SUL, CSL)
ZMK_CONDITIONAL_LAYER(slipspace_layer, SSL REL, SLL)
ZMK_CONDITIONAL_LAYER(foldspace_layer, LWL HSL, FSL)
ZMK_CONDITIONAL_LAYER(blackhole_layer, SSL SUL, BHL)
ZMK_CONDITIONAL_LAYER(whitehole_layer, SDL HSL, WHL)
ZMK_CONDITIONAL_LAYER(warp_layer, SSL HSL, WPL)
ZMK_CONDITIONAL_LAYER(sys_layer, FN NUM, SYS) |
Beta Was this translation helpful? Give feedback.
Should be fixed by dd06cf4. The new syntax is
ZMK_CONDITIONAL_LAYER(name, if_layers, then_layer)