From d5cc504b3ac684d105051fb06c133965c0cd2420 Mon Sep 17 00:00:00 2001 From: Okke Formsma Date: Sat, 7 Nov 2020 21:28:58 +0100 Subject: [PATCH] docs: update modifier docs --- docs/docs/codes/modifiers.mdx | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/docs/docs/codes/modifiers.mdx b/docs/docs/codes/modifiers.mdx index 9d8274cb..c573a670 100644 --- a/docs/docs/codes/modifiers.mdx +++ b/docs/docs/codes/modifiers.mdx @@ -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.