docs: update modifier docs

This commit is contained in:
Okke Formsma 2020-11-07 21:28:58 +01:00 committed by Pete Johanson
parent 51ca4fbc18
commit d5cc504b3a

View file

@ -30,13 +30,17 @@ These act like any other key code.
### Modifier Functions
Modifier functions add one or more modifiers to a code.
These functions take the form: `XX(code)`
- They _apply_ the modifier to another _code_.
- e.g. `&kp LS(A)` = `LEFT_SHIFT`+`A`
- aka a _shifted_ (capitalized) **A**.
- The _code_ and the _modifier_ are handled _as one_.
- They can be _combined_:
- e.g. `&kp LC(RA(B))` = `LEFT_CONTROL`+`RIGHT_ALT`+`B`
- Some codes _include_ modifiers in their definition.
- e.g. `DOLLAR` = `LS(N4)`
- Modifier functions apply a modifier to a code:
- `&kp LS(A)` = `LEFT_SHIFT`+`A` (a capitalized **A**).
- They can be combined:
- `&kp LC(RA(B))` = `LEFT_CONTROL`+`RIGHT_ALT`+`B`
- Some basic codes already include a modifier function in their definition:
- `DOLLAR` = `LS(NUMBER_4)`
- There are left- and right-handed versions of each modifier (also see table above):
- `LS`, `LC`, `LA`, `LG`, `RS`, `RC`, `RA`, `RG`
- Modified keys can safely be rolled-over. Modifier functions are released when another key is pressed.
- Press `&kp LS(A)`, then press `&kp B`, release `&kp LS(A)` and release `&kp B` results in **Ab**. Only the A is capitalized.