diff options
author | Andre Brait <[email protected]> | 2024-10-06 10:39:21 +0200 |
---|---|---|
committer | GitHub <[email protected]> | 2024-10-06 21:39:21 +1300 |
commit | 3cf94cb3083a8c7de632153bf33e569ea9f90526 (patch) | |
tree | 094b3c8ade8331524ac11d51e386ef398d7c07e7 /docs/ref_functions.md | |
parent | 208ebf54a905ce6e4e563a6811eca8c8dc8b17e1 (diff) | |
download | qmk_firmware-3cf94cb3083a8c7de632153bf33e569ea9f90526.tar.gz qmk_firmware-3cf94cb3083a8c7de632153bf33e569ea9f90526.zip |
Add easier way to set default single layer (#24376)
* Add set_single_default_layer to match set_single_persistent_default_layer
* Implements exactly the same behavior, except the write to EEPROM
Diffstat (limited to 'docs/ref_functions.md')
-rw-r--r-- | docs/ref_functions.md | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/docs/ref_functions.md b/docs/ref_functions.md index 3304981ef5..599515ebc1 100644 --- a/docs/ref_functions.md +++ b/docs/ref_functions.md @@ -69,7 +69,7 @@ layer_state_t layer_state_set_user(layer_state_t state) { Do you want to set the default layer, so that it's retained even after you unplug the board? If so, this is the function for you. -To use this, you would use `set_single_persistent_default_layer(layer)`. If you have a name defined for your layer, you can use that instead (such as _QWERTY, _DVORAK or _COLEMAK). +To do this, you would use `set_single_persistent_default_layer(layer)`. If you have a name defined for your layer, you can use that instead (such as _QWERTY, _DVORAK or _COLEMAK). This will set the default layer, update the persistent settings, and play a tune if you have [Audio](features/audio) enabled on your board, and the default layer sounds set. @@ -82,6 +82,8 @@ To configure the default layer sounds, you would want to define this in your `co } ``` +If you do not require it to be retained after you unplug the board, use `set_single_default_layer(layer)` instead. + ::: tip There are a large number of predefined songs in [quantum/audio/song_list.h](https://github.com/qmk/qmk_firmware/blob/master/quantum/audio/song_list.h) that you can use. |