Skip to content

Commit

Permalink
Fix a couple of typos that were causing confusion (qmk#8767)
Browse files Browse the repository at this point in the history
  • Loading branch information
spidey3 authored and Quarren42 committed Apr 15, 2020
1 parent b0e481f commit ee6cfbb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs/ref_functions.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ There are actually separate functions that you can use there, depending on what

### `update_tri_layer(x, y, z)`

The first is the `update_tri_layer(x, y, z)` function. This function check to see if layers `x` and `y` are both on. If they are both on, then it runs on layer `z`. Otherwise, if both `x` and `y` are not both on (either only one is, or neither is), then it runs off layer `z`.
The first is the `update_tri_layer(x, y, z)` function. This function check to see if layers `x` and `y` are both on. If they are both on, then it turns on layer `z`. Otherwise, if both `x` and `y` are not both on (either only one is, or neither is), then it turns off layer `z`.

This function is useful if you want to create specific keys that have this functionality, but other layer keycodes won't do this.

Expand Down Expand Up @@ -43,7 +43,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
```
### `update_tri_layer_state(state, x, y, z)`
The other function is `update_tri_layer_state(state, x, y, z)`. This function is meant to be called from they [`layer_state_set_*` functions](custom_quantum_functions.md#layer-change-code). This means that any time that you use a keycode to change the layer, this will be checked. So you could use `LT(layer, kc)` to change the layer and it will trigger the same layer check.
The other function is `update_tri_layer_state(state, x, y, z)`. This function is meant to be called from the [`layer_state_set_*` functions](custom_quantum_functions.md#layer-change-code). This means that any time that you use a keycode to change the layer, this will be checked. So you could use `LT(layer, kc)` to change the layer and it will trigger the same layer check.
The caveat to this method is that you cannot access the `z` layer without having `x` and `y` layers on, since if you try to activate just layer `z`, it will run this code and turn off layer `z` before you could use it.
Expand Down

0 comments on commit ee6cfbb

Please sign in to comment.