Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature request: preserve locality outside of direct keymap bindings #1494

Closed
manna-harbour opened this issue Oct 14, 2022 · 4 comments
Closed
Labels
behaviors bug Something isn't working

Comments

@manna-harbour
Copy link

manna-harbour commented Oct 14, 2022

Combos do not preserve locality as noted at https://zmk.dev/docs/features/combos:

SOURCE-SPECIFIC BEHAVIORS ON SPLIT KEYBOARDS
Invoking a source-specific behavior such as one of the reset behaviors using a combo will always trigger it on the central side of the keyboard, regardless of the side that the keys corresponding to key-positions are on.

It seems that this also applies to tap dance and mod morph. I guess it applies to everything other than a direct keymap binding and that the locality system will need to be extended.

In the mean time, a note should be added to the reset behavior docs.

@manna-harbour manna-harbour changed the title Feature request: preserve locality with tap dance Feature request: preserve locality outside of direct keymap bindings Oct 17, 2022
@bobobo1618
Copy link

Could this be resolved by setting global locality for the combo behaviours like it was for RGB underglow and ext power in https://github.com/zmkfirmware/zmk/pull/547/files#diff-fa3059ddb7abee58e50dbc5bb6b0218e6e4948d3742539e4f3a9aa67a1eb7278R149 ?

@bobobo1618
Copy link

This bug also applied to global behaviours like ext power and RGB underglow for me. Without bobobo1618/miryoku_zmk@6ba964f, the changes only applied to the central half.

@manna-harbour
Copy link
Author

Updating this issue:

All behaviors using the locality system (#547) do not work as intended on split keyboards when the behavior is not bound directly in the keymap. If the behavior is called from any other behavior the locality information is lost and the behavior is run only on central. I.e. source-specific behaviors (https://zmk.dev/docs/behaviors/reset) invoked from indirect bindings on peripheral will run on central instead of peripheral, and global behaviors (https://zmk.dev/docs/behaviors/underglow, https://zmk.dev/docs/behaviors/power) invoked from indirect bindings will run only on central instead of on central and peripheral.

The locality system should be extended to preserve locality information when invoked indirectly.

In the mean time, the docs (#1124) should have a warning added for all behaviors with locality (pages linked above), and the current warning at https://zmk.dev/docs/features/combos should be removed.

Work-arounds have been added to Miryoku ZMK:

@caksoylar caksoylar added bug Something isn't working behaviors labels Jun 11, 2023
alexvy86 added a commit to alexvy86/zmk-config-zen-2 that referenced this issue Jul 26, 2023
Necessary so they work on the correct half on split kbs.
Wrapping them in a tap-dance won't work.
See zmkfirmware/zmk#1494
seansfkelley added a commit to seansfkelley/zmk that referenced this issue Mar 11, 2024
…tors.

This commit does two things:

1. Provides default values for all indicator-underglow properties, which
   allows you to omit them entirely if you do not want that indicator.
2. Allows the right side to specify battery indicators.

I changed the phrasing of the battery left/right properties to be
self/other instead.

For (2), note that this currently does not work with the default Glove80
definition for the magic (indicator) key, since the right side does not
received the macro-wrapped `&rgb_ug RGB_STATUS` keypress. See the
usptream issue zmkfirmware#1494 for more.
(I resolved this for my own build by incorporating the changes from
zmkfirmware#1630.)
alexvy86 added a commit to alexvy86/zmk-config that referenced this issue May 24, 2024
Necessary so they work on the correct half on split kbs.
Wrapping them in a tap-dance won't work.
See zmkfirmware/zmk#1494
@caksoylar
Copy link
Contributor

Should be supported via #2409 (except for encoder behaviors noted in #2499 and some discussion on combos in #2500), please re-open if there are still issues for nested behaviors.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
behaviors bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants