diff options
Diffstat (limited to 'docs/feature_tri_layer.md')
| -rw-r--r-- | docs/feature_tri_layer.md | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/docs/feature_tri_layer.md b/docs/feature_tri_layer.md new file mode 100644 index 0000000000..aa6c87719c --- /dev/null +++ b/docs/feature_tri_layer.md | |||
| @@ -0,0 +1,48 @@ | |||
| 1 | # Tri Layers :id=tri-layers | ||
| 2 | |||
| 3 | This enables support for the OLKB style "Tri Layer" keycodes. These function similar to the `MO` (momentary) function key, but if both the "Lower" and "Upper" keys are pressed, it activates a third "Adjust" layer. To enable this functionality, add this line to your `rules.mk`: | ||
| 4 | |||
| 5 | ```make | ||
| 6 | TRI_LAYER_ENABLE = yes | ||
| 7 | ``` | ||
| 8 | |||
| 9 | Note that the "upper", "lower" and "adjust" names don't have a particular significance, they are just used to identify and clarify the behavior. Layers are processed from highest numeric value to lowest, however the values are not required to be consecutive. | ||
| 10 | |||
| 11 | For a detailed explanation of how the layer stack works, check out [Keymap Overview](keymap.md#keymap-and-layers). | ||
| 12 | |||
| 13 | ## Keycodes :id=keycodes | ||
| 14 | |||
| 15 | | Keycode | Alias | Description | | ||
| 16 | |----------------------|-----------|---------------------------------------------------------------------------------------------------------| | ||
| 17 | | `QK_TRI_LAYER_LOWER` | `TL_LOWR` | Momentarily enables the "lower" layer. Enables the "adjust" layer if the "upper" layer is also enabled" | | ||
| 18 | | `QK_TRI_LAYER_UPPER` | `TL_UPPR` | Momentarily enables the "upper" layer. Enables the "adjust" layer if the "lower" layer is also enabled" | | ||
| 19 | |||
| 20 | ## Configuration | ||
| 21 | |||
| 22 | To change the default values for the layers, you can change these defines, in your `config.h` | ||
| 23 | |||
| 24 | | Config name | Default | Description | | ||
| 25 | |--------------------------|---------|------------------------------------------| | ||
| 26 | | `TRI_LAYER_LOWER_LAYER` | `1` | Sets the default for the "lower" layer. | | ||
| 27 | | `TRI_LAYER_UPPER_LAYER` | `2` | Sets the default for the "upper" layer. | | ||
| 28 | | `TRI_LAYER_ADJUST_LAYER` | `3` | Sets the default for the "adjust" layer. | | ||
| 29 | |||
| 30 | Eg, if you wanted to set the "Adjust" layer to be layer 5, you'd add this to your `config.h`: | ||
| 31 | |||
| 32 | ```c | ||
| 33 | #define TRI_LAYER_ADJUST_LAYER 5 | ||
| 34 | ``` | ||
| 35 | |||
| 36 | ## Functions | ||
| 37 | |||
| 38 | | Function name | Description | | ||
| 39 | |----------------------------------------------|-------------------------------------------------| | ||
| 40 | | `set_tri_layer_lower_layer(layer)` | Changes the "lower" layer*. | | ||
| 41 | | `set_tri_layer_upper_layer(layer)` | Changes the "upper" layer*. | | ||
| 42 | | `set_tri_layer_adjust_layer(layer)` | Changes the "adjust" layer*. | | ||
| 43 | | `set_tri_layer_layers(lower, upper, adjust)` | Stes the "lower", "upper" and "adjust" layers*. | | ||
| 44 | | `get_tri_layer_lower_layer()` | Gets the current "lower" layer. | | ||
| 45 | | `get_tri_layer_upper_layer()` | Gets the current "upper" layer. | | ||
| 46 | | `get_tri_layer_adjust_layer()` | Gets the current "adjust" layer. | | ||
| 47 | |||
| 48 | !> Note: these settings are not persisent, and will be reset to the default on power loss or power cycling of the controller. | ||
