summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorQMK Bot <hello@qmk.fm>2024-02-20 00:45:57 +0000
committerQMK Bot <hello@qmk.fm>2024-02-20 00:45:57 +0000
commite198643d66b488945964abe913aa0356b87423a1 (patch)
treed273d1514e4c431d06ea56736fce132bd3e7982e /docs
parent66780783c79ba8be38dcc0921b15ddd68827e97d (diff)
parent7df44ffb751369d7632d6bb6affb8119ce3d038b (diff)
Merge remote-tracking branch 'origin/master' into develop
Diffstat (limited to 'docs')
-rw-r--r--docs/feature_combo.md33
1 files changed, 16 insertions, 17 deletions
diff --git a/docs/feature_combo.md b/docs/feature_combo.md
index 2e802446b6..61f8b2ee19 100644
--- a/docs/feature_combo.md
+++ b/docs/feature_combo.md
@@ -333,27 +333,26 @@ will give the _NAV layer as a reference to it's self. All other layers
will have the default for their combo reference layer. If the default
is not set, all other layers will reference themselves.
- ```c
- #define COMBO_REF_DEFAULT _MY_COMBO_LAYER
- ...
-
- uint8_t combo_ref_from_layer(uint8_t layer){
- switch (get_highest_layer(layer_state)){
- case _DVORAK: return _QWERTY;
- case _NAV: return _NAV;
- default: return _MY_COMBO_LAYER;
- }
- return layer; // important if default is not in case.
+```c
+#define COMBO_REF_DEFAULT _MY_COMBO_LAYER
+
+uint8_t combo_ref_from_layer(uint8_t layer){
+ switch (get_highest_layer(layer_state)){
+ case _DVORAK: return _QWERTY;
+ case _NAV: return _NAV;
+ default: return _MY_COMBO_LAYER;
}
- ```
+ return layer; // important if default is not in case.
+}
+```
The equivalent definition using the combo macros is this:
- ```c
- COMBO_REF_LAYER(_DVORAK, _QWERTY)
- COMBO_REF_LAYER(_NAV, _NAV)
- DEFAULT_REF_LAYER(_MY_COMBO_LAYER).
- ```
+```c
+COMBO_REF_LAYER(_DVORAK, _QWERTY)
+COMBO_REF_LAYER(_NAV, _NAV)
+DEFAULT_REF_LAYER(_MY_COMBO_LAYER).
+```
## User callbacks