zmk icon indicating copy to clipboard operation
zmk copied to clipboard

feat(behaviours): Layer Locking (&llck/&layer_lock) behaviour

Open ystepanoff opened this issue 9 months ago • 2 comments

This PR implements the layer locking behaviour (&llck / &layer_lock) that allows to lock currently active layer(s). It is possible to lock multiple activated layers at once, which allows this to work nicely with conditional layers.

Manual testing I performed:

  • [x] locking a layer
  • [x] locking a conditional layer

Added an automated test which is also included in this PR. Documentation section for the new behaviour have also been added.

PR check-list

  • [x] Branch has a clean commit history
  • [x] Additional tests are included, if changing behaviors/core code that is testable.
  • [x] Proper Copyright + License headers added to applicable files (Generally, we stick to "The ZMK Contributors" for copyrights to help avoid churn when files get edited)
  • [x] Pre-commit used to check formatting of files, commit messages, etc.
  • [x] Includes any necessary documentation changes.

ystepanoff avatar May 07 '25 21:05 ystepanoff

It seems this is the same or similar to #1984 and #2717

omulh avatar May 08 '25 13:05 omulh

It seems this is the same or similar to #1984 and #2717

Yep, I raised this PR as it seems #1984 needs some more changes (I'm not implying mine doesn't 🙂), just worried that last changes were pushed about a year ago IIRC). #2717 is slightly different (but serves the same purpose it seems): it adds locking property to the layer behaviours. Regardless of which PR will be chosen I am quite keen to see layer locking in upstream.

ystepanoff avatar May 08 '25 22:05 ystepanoff

Closing as #2717 is now in main.

nmunnich avatar Nov 14 '25 22:11 nmunnich