From d1f0ac0b5b9e70f4810a3a648d57ee0885e91b00 Mon Sep 17 00:00:00 2001 From: fauxpark Date: Tue, 31 May 2022 11:33:37 +0000 Subject: [PATCH] =?UTF-8?q?Deploying=20to=20gh-pages=20from=20master=20@?= =?UTF-8?q?=208153b55e07acb2dff9895b98eb9d9ca3161afb5a=20=F0=9F=9A=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- feature_advanced_keycodes.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/feature_advanced_keycodes.md b/feature_advanced_keycodes.md index 36b81a4e8e..83066187c7 100644 --- a/feature_advanced_keycodes.md +++ b/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() & == `. -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: