diff options
Diffstat (limited to 'users/drashna/keyrecords/caps_word.c')
-rw-r--r-- | users/drashna/keyrecords/caps_word.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/users/drashna/keyrecords/caps_word.c b/users/drashna/keyrecords/caps_word.c index 731568328a..cc9ca93b72 100644 --- a/users/drashna/keyrecords/caps_word.c +++ b/users/drashna/keyrecords/caps_word.c @@ -3,13 +3,17 @@ #include "caps_word.h" +#ifndef IS_COMMAND +# define IS_COMMAND() (get_mods() == MOD_MASK_SHIFT) +#endif + bool caps_word_enabled = false; bool caps_word_shifted = false; bool process_caps_word(uint16_t keycode, keyrecord_t* record) { if (!caps_word_enabled) { // Pressing both shift keys at the same time enables caps word. - if (((get_mods() | get_oneshot_mods()) & MOD_MASK_SHIFT) == MOD_MASK_SHIFT) { + if (IS_COMMAND()) { clear_mods(); clear_oneshot_mods(); caps_word_shifted = false; |