diff options
author | Joel Challis <[email protected]> | 2024-11-23 10:09:34 +0000 |
---|---|---|
committer | GitHub <[email protected]> | 2024-11-23 10:09:34 +0000 |
commit | 4a5bae51cd1f2cbca0ab8c8ae6e15262f8dc5a68 (patch) | |
tree | 6dedf92beaa32ddd33476aec43c856f6a37901ed /docs | |
parent | 9e9b4acbde48acbe51fb9ff198be5dce49608ee9 (diff) | |
download | qmk_firmware-4a5bae51cd1f2cbca0ab8c8ae6e15262f8dc5a68.tar.gz qmk_firmware-4a5bae51cd1f2cbca0ab8c8ae6e15262f8dc5a68.zip |
[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 <[email protected]>
---------
Co-authored-by: Nebuleon <[email protected]>
Co-authored-by: Nick Brassel <[email protected]>
Diffstat (limited to 'docs')
-rw-r--r-- | docs/feature_layers.md | 3 | ||||
-rw-r--r-- | docs/keycodes.md | 3 |
2 files changed, 4 insertions, 2 deletions
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. diff --git a/docs/keycodes.md b/docs/keycodes.md index cae6418266..cf170721c8 100644 --- a/docs/keycodes.md +++ b/docs/keycodes.md @@ -401,7 +401,8 @@ See also: [Layer Switching](feature_layers#switching-and-toggling-layers) |Key |Description | |----------------|----------------------------------------------------------------------------------| -|`DF(layer)` |Set the base (default) layer | +|`DF(layer)` |Set the base (default) layer until the keyboard loses power | +|`PDF(layer)` |Set the base (default) layer in EEPROM | |`MO(layer)` |Momentarily turn on `layer` when pressed (requires `KC_TRNS` on destination layer)| |`OSL(layer)` |Momentarily activates `layer` until a key is pressed. See [One Shot Keys](one_shot_keys) for details. | |`LM(layer, mod)`|Momentarily turn on `layer` (like MO) with `mod` active as well. Where `mod` is a mods_bit. Mods can be viewed [here](mod_tap). Example Implementation: `LM(LAYER_1, MOD_LALT)`| |