Tri-state Layers
Layers are very commonly used with split keyboards, as they're helpful in bringing functionality closer to your fingers. With a limited number of keys available on the "base layer", which is always active when not pressing any layer key, you want to make good use of it.
A feature that is very common to use are "tri-state layers". If you have two layer keys, then holding them down both at the same time can activate a third layer. For many people, having these three layers provides plenty of room to work with.
QMK
In QMK, you can use the update_tri_layer
function for this. You can refer to List of Useful Core Functions To Make Your Keyboard Better on the QMK documentation to implement this.
Vial
You'll want to add three keycodes to your keymap by assigning them to your chosen keys:
- On layer
0
: The keycodeMO(1)
, under the Layers tab, will allow you to use layer1
. - On layer
0
: The keycodeMO(2)
, under the Layers tab, will allow you to use layer2
. - On layer
1
: Place the keycodeMO(3)
on the same position you placedMO(3)
at on layer0
. - On layer
2
: Place the keycodeMO(3)
on the same position you placedMO(2)
at on layer0
.
Now, when you hold MO(1)
, your keyboard will activate layer 1
. This layer takes priority over the base layer, causing the second key to become MO(3)
, which you can hold to access layer 3
. All done!
With this setup, you can now stop holding MO(1)
while you're in layer 3
, because the MO(3)
key will already keep it active on its own.
ZMK
You can use the Conditional Layers functionality to use tri-state layers in your ZMK-powered keyboard.