Adding ComboLayers to Layers Module (See #658) (#666)

---------

Co-authored-by: xs5871 <60395129+xs5871@users.noreply.github.com>
This commit is contained in:
Alex Miller
2023-03-10 15:40:57 -05:00
committed by GitHub
parent adff02e88a
commit 878fe0deca
3 changed files with 180 additions and 41 deletions

View File

@@ -33,6 +33,11 @@ Some helpful guidelines to keep in mind as you design your layers:
- Only reference higher-numbered layers from a given layer
- Leave keys as `KC.TRNS` in higher layers when they would overlap with a layer-switch
## Using Combo Layers
Combo Layers allow you to activate a corresponding layer based on the activation of 2 or more other layers.
The advantage of using Combo layers is that when you release one of the layer keys, it stays on whatever layer is still being held.
See [combo layers documentation](combolayers.md) for more information on it's function and to see examples.
### Using Multiple Base Layers
In some cases, you may want to have more than one base layer (for instance you want to use
both QWERTY and Dvorak layouts, or you have a custom gamepad that can switch between
@@ -40,6 +45,7 @@ different games). In this case, best practice is to have these layers be the low
defined first in your keymap. These layers are mutually-exclusive, so treat changing default
layers with `KC.DF()` the same way that you would treat using `KC.TO()`
## Example Code
For our example, let's take a simple 3x3 macropad with two layers as follows: