Browse Source

docs: update modifier docs

xmkb
Okke Formsma 4 years ago committed by Pete Johanson
parent
commit
d5cc504b3a
  1. 20
      docs/docs/codes/modifiers.mdx

20
docs/docs/codes/modifiers.mdx

@ -30,13 +30,17 @@ These act like any other key code. @@ -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.

Loading…
Cancel
Save