summaryrefslogtreecommitdiff
path: root/quantum/process_keycode
diff options
context:
space:
mode:
Diffstat (limited to 'quantum/process_keycode')
-rw-r--r--quantum/process_keycode/process_combo.h2
-rw-r--r--quantum/process_keycode/process_key_override.c2
-rw-r--r--quantum/process_keycode/process_space_cadet.c10
3 files changed, 7 insertions, 7 deletions
diff --git a/quantum/process_keycode/process_combo.h b/quantum/process_keycode/process_combo.h
index 4c4e574e34..e430c4a5f7 100644
--- a/quantum/process_keycode/process_combo.h
+++ b/quantum/process_keycode/process_combo.h
@@ -69,7 +69,7 @@ typedef struct {
#endif
/* check if keycode is only modifiers */
-#define KEYCODE_IS_MOD(code) (IS_MOD(code) || (code >= QK_MODS && code <= QK_MODS_MAX && !(code & QK_BASIC_MAX)))
+#define KEYCODE_IS_MOD(code) (IS_MODIFIER_KEYCODE(code) || (IS_QK_MODS(code) && !QK_MODS_GET_BASIC_KEYCODE(code)))
bool process_combo(uint16_t keycode, keyrecord_t *record);
void combo_task(void);
diff --git a/quantum/process_keycode/process_key_override.c b/quantum/process_keycode/process_key_override.c
index 9c5abccd4f..9b91ae2223 100644
--- a/quantum/process_keycode/process_key_override.c
+++ b/quantum/process_keycode/process_key_override.c
@@ -402,7 +402,7 @@ bool process_key_override(const uint16_t keycode, const keyrecord_t *const recor
#endif
const bool key_down = record->event.pressed;
- const bool is_mod = IS_MOD(keycode);
+ const bool is_mod = IS_MODIFIER_KEYCODE(keycode);
if (key_down) {
switch (keycode) {
diff --git a/quantum/process_keycode/process_space_cadet.c b/quantum/process_keycode/process_space_cadet.c
index a62cd60a70..3109ea1711 100644
--- a/quantum/process_keycode/process_space_cadet.c
+++ b/quantum/process_keycode/process_space_cadet.c
@@ -89,16 +89,16 @@ void perform_space_cadet(keyrecord_t *record, uint16_t sc_keycode, uint8_t holdM
#ifdef SPACE_CADET_MODIFIER_CARRYOVER
sc_mods = get_mods();
#endif
- if (IS_MOD(holdMod)) {
+ if (IS_MODIFIER_KEYCODE(holdMod)) {
register_mods(MOD_BIT(holdMod));
}
} else {
if (sc_last == holdMod && timer_elapsed(sc_timer) < GET_TAPPING_TERM(sc_keycode, record)) {
if (holdMod != tapMod) {
- if (IS_MOD(holdMod)) {
+ if (IS_MODIFIER_KEYCODE(holdMod)) {
unregister_mods(MOD_BIT(holdMod));
}
- if (IS_MOD(tapMod)) {
+ if (IS_MODIFIER_KEYCODE(tapMod)) {
register_mods(MOD_BIT(tapMod));
}
}
@@ -109,11 +109,11 @@ void perform_space_cadet(keyrecord_t *record, uint16_t sc_keycode, uint8_t holdM
#ifdef SPACE_CADET_MODIFIER_CARRYOVER
clear_weak_mods();
#endif
- if (IS_MOD(tapMod)) {
+ if (IS_MODIFIER_KEYCODE(tapMod)) {
unregister_mods(MOD_BIT(tapMod));
}
} else {
- if (IS_MOD(holdMod)) {
+ if (IS_MODIFIER_KEYCODE(holdMod)) {
unregister_mods(MOD_BIT(holdMod));
}
}