summaryrefslogtreecommitdiff
path: root/tmk_core/common
diff options
context:
space:
mode:
authorDrashna Jaelre <drashna@live.com>2019-01-26 15:49:45 -0800
committerMechMerlin <30334081+mechmerlin@users.noreply.github.com>2019-01-26 15:49:45 -0800
commitb05c0e46c6c62972b68518635104fb58927d1a13 (patch)
tree4037e0ff8b7d52aee235e9a7e31083984b453777 /tmk_core/common
parent478538e0d9938952568c62d135166d2cba15a70c (diff)
Adds a default value for IS_COMMAND for COMMAND feature (#4301)
* Add default value for IS_COMMAND for COMMAND feature * Cleanup and consistency * Update Templates to reflect change * Fix IS_COMMAND in template * Fix IS_COMMAND define * Use consistent IS_COMMAND block in templates * Remove unnecessary `#undef IS_COMMAND` directives * Fix compile issue on orthodox * Reomve IS_COMMAND option for newer boards * Remove all existing definitions of IS_COMMAND if they use default LSHIFT and RSHIFT setting * Remove a couple of additional IS_COMMAND defines * Remove remaining redundant IS_COMMAND definitions * Remove #undef IS_COMMAND from orthodox:drashna and whitefox:konstantin * Remove multiple empty lines in modified config.h files * Update additional boards * Reomve IS_COMMAND from newer boards * Update Alice keyboard * Remove IS_COMMAND from additional boards Jan 24th edition
Diffstat (limited to 'tmk_core/common')
-rw-r--r--tmk_core/common/command.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/tmk_core/common/command.h b/tmk_core/common/command.h
index c38f2b9e80..e25b974630 100644
--- a/tmk_core/common/command.h
+++ b/tmk_core/common/command.h
@@ -34,6 +34,9 @@ bool command_proc(uint8_t code);
#define command_proc(code) false
#endif
+#ifndef IS_COMMAND
+#define IS_COMMAND() (keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)))
+#endif
#ifndef MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS
#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true