A layer has a name. It contains rules for action triggers (
hold). There must be at least one layer - the base layer - and you can define multiple additional layers. Only one layer can be active at any time. However, rules do not have to be defined for all keys on each layer. For keys without a rule, the rule from the base layer is used.
Here is an example with all three action triggers and all available actions:
layer name=Base 1 : tap=Codes[ Q ] : long_tap=Shift 6 : tap=Codes[ A ] : long_tap=Shift : hold=Codes[ LEFT_GUI ] 17 : tap=ChangeLayer( Special ) layer name=Special 18 : tap=ResetKeyboard layer name=Umlaut 6 : tap=Sequence[Codes[ LEFT_ALT, U ]; Codes[ A ]] : long_tap=Sequence[Codes[ LEFT_ALT, U ]; Codes[ LEFT_SHIFT, A ]] : hold=Codes[ LEFT_GUI ]
A line which defines rules for a key starts with the key number followed by at least one rule. A rule consists of the trigger name (
hold) followed by the equal sign and the action. Rules are separated by colons.