From 2395069b0bf84e2667c36460d5c3a3c4225cbd85 Mon Sep 17 00:00:00 2001 From: precondition <57645186+precondition@users.noreply.github.com> Date: Sun, 28 Feb 2021 06:42:17 +0100 Subject: [Docs] New section to modifier docs: Checking Modifier State (#10550) * Added new section to docs: Checking Modifier State * Added id anchors to all headers in modifiers docs * Added a Wikipedia link to bitwise operators and... crosslinked to the QMK macro docs. * Added an explanation on the format of mod bitmask * Added .md extension to hyperlinks to macros docs * Corrected mod mask order and changed notation * Documented add_oneshot_mods and del_oneshot_mods * Mentioned modifier checks in the macro docs * Explained strict modifier checking i.e. using `get_mods() & MOD_MASK == MOD_MASK` instead of simply `get_mods() & MOD_MASK` * Added (un)register_mods to the docs * Put left term of comparison in parens --- docs/feature_macros.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'docs/feature_macros.md') diff --git a/docs/feature_macros.md b/docs/feature_macros.md index 6e69ad642c..3660f37755 100644 --- a/docs/feature_macros.md +++ b/docs/feature_macros.md @@ -209,7 +209,7 @@ SEND_STRING(".."SS_TAP(X_END)); There are some functions you may find useful in macro-writing. Keep in mind that while you can write some fairly advanced code within a macro, if your functionality gets too complex you may want to define a custom keycode instead. Macros are meant to be simple. -?> You can also use the functions described in [Useful functions](ref_functions.md) for additional functionality. For example `reset_keyboard()` allows you to reset the keyboard as part of a macro. +?> You can also use the functions described in [Useful function](ref_functions.md) and [Checking modifier state](feature_advanced_keycodes#checking-modifier-state) for additional functionality. For example, `reset_keyboard()` allows you to reset the keyboard as part of a macro and `get_mods() & MOD_MASK_SHIFT` lets you check for the existence of active shift modifiers. ### `record->event.pressed` -- cgit v1.2.3