From 4a5bae51cd1f2cbca0ab8c8ae6e15262f8dc5a68 Mon Sep 17 00:00:00 2001 From: Joel Challis Date: Sat, 23 Nov 2024 10:09:34 +0000 Subject: [Feature] Add keycode PDF(layer) to set the default layer in EEPROM (#24630) * [Feature] Add keycode PDF(layer) to set the default layer in EEPROM (#21881) * Apply suggestions from code review Co-authored-by: Nick Brassel --------- Co-authored-by: Nebuleon <2391500+Nebuleon@users.noreply.github.com> Co-authored-by: Nick Brassel --- docs/feature_layers.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'docs/feature_layers.md') diff --git a/docs/feature_layers.md b/docs/feature_layers.md index 45f02fe536..da6a28bd88 100644 --- a/docs/feature_layers.md +++ b/docs/feature_layers.md @@ -8,7 +8,8 @@ For a detailed explanation of how the layer stack works, checkout [Keymap Overvi These functions allow you to activate layers in various ways. Note that layers are not generally independent layouts -- multiple layers can be activated at once, and it's typical for layers to use `KC_TRNS` to allow keypresses to pass through to lower layers. When using momentary layer switching with MO(), LM(), TT(), or LT(), make sure to leave the key on the above layers transparent or it may not work as intended. -* `DF(layer)` - switches the default layer. The default layer is the always-active base layer that other layers stack on top of. See below for more about the default layer. This might be used to switch from QWERTY to Dvorak layout. (Note that this is a temporary switch that only persists until the keyboard loses power. To modify the default layer in a persistent way requires deeper customization, such as calling the `set_single_persistent_default_layer` function inside of [process_record_user](custom_quantum_functions#programming-the-behavior-of-any-keycode).) +* `DF(layer)` - switches the default layer. The default layer is the always-active base layer that other layers stack on top of. See below for more about the default layer. This might be used to switch from QWERTY to Dvorak layout. Note that this is a temporary switch that only persists until the keyboard loses power. +* `PDF(layer)` - sets a persistent default layer. This switch, which will last through a power loss, might be used to switch from QWERTY to Dvorak layout and only switch again when you want to. * `MO(layer)` - momentarily activates *layer*. As soon as you let go of the key, the layer is deactivated. * `LM(layer, mod)` - Momentarily activates *layer* (like `MO`), but with modifier(s) *mod* active. Only supports layers 0-15. The modifiers this keycode accept are prefixed with `MOD_`, not `KC_`. These modifiers can be combined using bitwise OR, e.g. `LM(_RAISE, MOD_LCTL | MOD_LALT)`. * `LT(layer, kc)` - momentarily activates *layer* when held, and sends *kc* when tapped. Only supports layers 0-15. -- cgit v1.2.3