summaryrefslogtreecommitdiff
path: root/quantum
diff options
context:
space:
mode:
authorRyan <fauxpark@gmail.com>2022-10-27 23:59:58 +1100
committerGitHub <noreply@github.com>2022-10-27 13:59:58 +0100
commitefe520645ec8b67d306eb63f54b0a52380269596 (patch)
tree8845285129c53cc8feadb3520599160c64c1cec3 /quantum
parent8436f0dfa6ee35a33080237280b55a89adbb5f7e (diff)
Normalise Combo keycodes (#18877)
Diffstat (limited to 'quantum')
-rw-r--r--quantum/process_keycode/process_combo.c6
-rw-r--r--quantum/quantum_keycodes.h11
-rw-r--r--quantum/quantum_keycodes_legacy.h4
3 files changed, 15 insertions, 6 deletions
diff --git a/quantum/process_keycode/process_combo.c b/quantum/process_keycode/process_combo.c
index e5135e5a64..d8b089db16 100644
--- a/quantum/process_keycode/process_combo.c
+++ b/quantum/process_keycode/process_combo.c
@@ -531,17 +531,17 @@ bool process_combo(uint16_t keycode, keyrecord_t *record) {
bool is_combo_key = false;
bool no_combo_keys_pressed = true;
- if (keycode == CMB_ON && record->event.pressed) {
+ if (keycode == QK_COMBO_ON && record->event.pressed) {
combo_enable();
return true;
}
- if (keycode == CMB_OFF && record->event.pressed) {
+ if (keycode == QK_COMBO_OFF && record->event.pressed) {
combo_disable();
return true;
}
- if (keycode == CMB_TOG && record->event.pressed) {
+ if (keycode == QK_COMBO_TOGGLE && record->event.pressed) {
combo_toggle();
return true;
}
diff --git a/quantum/quantum_keycodes.h b/quantum/quantum_keycodes.h
index 36cb01b5f5..a3f9888ffc 100644
--- a/quantum/quantum_keycodes.h
+++ b/quantum/quantum_keycodes.h
@@ -408,9 +408,9 @@ enum quantum_keycodes {
QK_SPACE_CADET_RIGHT_ALT_PARENTHESIS_CLOSE, // 5CF7
// Combos
- CMB_ON, // 5CF8
- CMB_OFF, // 5CF9
- CMB_TOG, // 5CFA
+ QK_COMBO_ON, // 5CF8
+ QK_COMBO_OFF, // 5CF9
+ QK_COMBO_TOGGLE, // 5CFA
// Magic (continued)
MAGIC_SWAP_LCTL_LGUI, // 5CFB
@@ -872,6 +872,11 @@ enum quantum_keycodes {
#define SC_RAPC QK_SPACE_CADET_RIGHT_ALT_PARENTHESIS_CLOSE
#define SC_SENT QK_SPACE_CADET_RIGHT_SHIFT_ENTER
+// Combos
+#define CM_ON QK_COMBO_ON
+#define CM_OFF QK_COMBO_OFF
+#define CM_TOGG QK_COMBO_TOGGLE
+
// Swap Hands
#define SH_T(kc) (QK_SWAP_HANDS | (kc))
#define SH_TG (QK_SWAP_HANDS | OP_SH_TOGGLE)
diff --git a/quantum/quantum_keycodes_legacy.h b/quantum/quantum_keycodes_legacy.h
index 92ec68b622..a6023dee30 100644
--- a/quantum/quantum_keycodes_legacy.h
+++ b/quantum/quantum_keycodes_legacy.h
@@ -18,6 +18,10 @@
#define ONESHOT_DISABLE QK_ONE_SHOT_OFF
#define ONESHOT_TOGGLE QK_ONE_SHOT_TOGGLE
+#define CMB_ON QK_COMBO_ON
+#define CMB_OFF QK_COMBO_OFF
+#define CMB_TOG QK_COMBO_TOGGLE
+
#define PROGRAMMABLE_BUTTON_1 QK_PROGRAMMABLE_BUTTON_1
#define PROGRAMMABLE_BUTTON_2 QK_PROGRAMMABLE_BUTTON_2
#define PROGRAMMABLE_BUTTON_3 QK_PROGRAMMABLE_BUTTON_3