summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorQMK Bot <hello@qmk.fm>2022-05-31 11:32:26 +0000
committerQMK Bot <hello@qmk.fm>2022-05-31 11:32:26 +0000
commit38839a9105dd5c7fe4a00681537270dcae9d8fdc (patch)
tree61e2855dc8cf9b422f46a2d2d77dee39c0b385c6
parent6fdce80822fb3b284ca90a9c6f1e5844aa52aee0 (diff)
parent8153b55e07acb2dff9895b98eb9d9ca3161afb5a (diff)
Merge remote-tracking branch 'origin/master' into develop
-rw-r--r--docs/feature_advanced_keycodes.md2
1 files changed, 1 insertions, 1 deletions
diff --git a/docs/feature_advanced_keycodes.md b/docs/feature_advanced_keycodes.md
index 36b81a4e8e..83066187c7 100644
--- a/docs/feature_advanced_keycodes.md
+++ b/docs/feature_advanced_keycodes.md
@@ -39,7 +39,7 @@ In practice, this means that you can check whether a given modifier is active wi
To check that *only* a specific set of mods is active at a time, AND the modifier state and your desired mod mask as explained above and compare the result to the mod mask itself: `get_mods() & <mod mask> == <mod mask>`.
-For example, let's say you want to trigger a piece of custom code if one-shot left control and one-shot left shift are on but every other one-shot mods are off. To do so, you can compose the desired mod mask by combining the mod bits for left control and shift with `(MOD_BIT(KC_LCTL) | MOD_BIT(KC_LSFT))` and then plug it in: `get_oneshot_mods & (MOD_BIT(KC_LCTL) | MOD_BIT(KC_LSFT)) == (MOD_BIT(KC_LCTL) | MOD_BIT(KC_LSFT))`. Using `MOD_MASK_CS` instead for the mod bitmask would have forced you to press four modifier keys (both versions of control and shift) to fulfill the condition.
+For example, let's say you want to trigger a piece of custom code if one-shot left control and one-shot left shift are on but every other one-shot mods are off. To do so, you can compose the desired mod mask by combining the mod bits for left control and shift with `(MOD_BIT(KC_LCTL) | MOD_BIT(KC_LSFT))` and then plug it in: `get_oneshot_mods() & (MOD_BIT(KC_LCTL) | MOD_BIT(KC_LSFT)) == (MOD_BIT(KC_LCTL) | MOD_BIT(KC_LSFT))`. Using `MOD_MASK_CS` instead for the mod bitmask would have forced you to press four modifier keys (both versions of control and shift) to fulfill the condition.
The full list of mod masks is as follows: