Switch to a layer momentarily, then hit a key on that layer, and stay in the layer. You're locked in until you hit that same key again to "release" and pop back out to layer 0.
This is the simplest way to describe Layer Lock, a useful QMK feature originally created by Pascal Getreuer and friends (see credits below).
To enable Layer Lock, simply assign a key in the destination layer to "Lock Layer" on tap, like so:
Now, whenever you tap this key, you'll stay in this layer.
This is one of those simple ideas that's quite powerful in practice. You can have a "Lock Layer" key in the same spot on each one of your layers, and build quick muscle memory for it. If momentary layer switches are like a superpowered Shift, this is the superpowered Caps Lock to go along with them.
One classic use case is actually as a sort of a "Num Lock" key: You could have a layer with a numpad and symbols. If you only have a few digits to enter, you could switch to this layer momentarily, by holding a key down. Then, if you find that you need do some serious number crunching, just hit Layer Lock on that numpad layer and stay there. Nice!
Credits and thanks
This sort of feature makes me so happy to be using open-source firmware. It's the result of work by Pascal and several other contributors we'd like to acknowledge. As Pascal says:
"Besides myself, please acknowledge @drashna, @mwpardue, @ujl123, @sporkus, and u/DB_Cooper75 for contributions and feedback that helped improve Layer Lock."
Many thanks to Pascal, Drashna (ZSA's official "QMK Liaison"), and all of the contributors noted above! This also feels like a good time to thank Pascal for another of my favorite features, Caps WORD (one of the keys on the default Voyager layout!). Thank you for creating it!
If you want to get technical and maybe contribute yourself, Pascal wrote an in-depth blog post about Layer Lock.
I hope you enjoy Layer Lock, and email us with examples and interesting uses, as well as any questions on the feature.