summaryrefslogtreecommitdiff
path: root/quantum
diff options
context:
space:
mode:
authorRyan <fauxpark@gmail.com>2022-10-25 03:30:37 +1100
committerGitHub <noreply@github.com>2022-10-24 17:30:37 +0100
commita80b886751aaddb0e030a14a82cf99b6778145b4 (patch)
tree2b1b25f5f970f40b0836a31f180ac08979cf62ce /quantum
parent6bbe8b6eddc56d43f4db07c665bf1791ea2ab871 (diff)
Deprecate `CAPS_WORD`/`CAPSWRD` for `CW_TOGG` (#18834)
Diffstat (limited to 'quantum')
-rw-r--r--quantum/process_keycode/process_caps_word.c2
-rw-r--r--quantum/quantum_keycodes.h7
-rw-r--r--quantum/quantum_keycodes_legacy.h2
3 files changed, 7 insertions, 4 deletions
diff --git a/quantum/process_keycode/process_caps_word.c b/quantum/process_keycode/process_caps_word.c
index 1b9583196d..7a83f7bf49 100644
--- a/quantum/process_keycode/process_caps_word.c
+++ b/quantum/process_keycode/process_caps_word.c
@@ -15,7 +15,7 @@
#include "process_caps_word.h"
bool process_caps_word(uint16_t keycode, keyrecord_t* record) {
- if (keycode == CAPSWRD) { // Pressing CAPSWRD toggles Caps Word.
+ if (keycode == QK_CAPS_WORD_TOGGLE) {
if (record->event.pressed) {
caps_word_toggle();
}
diff --git a/quantum/quantum_keycodes.h b/quantum/quantum_keycodes.h
index ac3968895b..2e2ba8cd81 100644
--- a/quantum/quantum_keycodes.h
+++ b/quantum/quantum_keycodes.h
@@ -603,7 +603,7 @@ enum quantum_keycodes {
SECURE_TOGGLE,
SECURE_REQUEST,
- CAPS_WORD,
+ QK_CAPS_WORD_TOGGLE,
MAGIC_SWAP_ESCAPE_CAPSLOCK,
MAGIC_UNSWAP_ESCAPE_CAPSLOCK,
@@ -846,6 +846,9 @@ enum quantum_keycodes {
// Leader key
#define QK_LEAD QK_LEADER
+// Caps Word
+#define CW_TOGG QK_CAPS_WORD_TOGGLE
+
// Swap Hands
#define SH_T(kc) (QK_SWAP_HANDS | (kc))
#define SH_TG (QK_SWAP_HANDS | OP_SH_TOGGLE)
@@ -952,6 +955,4 @@ enum quantum_keycodes {
#define QK_PROGRAMMABLE_BUTTON_MIN QK_PROGRAMMABLE_BUTTON_1
#define QK_PROGRAMMABLE_BUTTON_MAX QK_PROGRAMMABLE_BUTTON_32
-#define CAPSWRD CAPS_WORD
-
#include "quantum_keycodes_legacy.h"
diff --git a/quantum/quantum_keycodes_legacy.h b/quantum/quantum_keycodes_legacy.h
index bab34025cf..40aa0f49a1 100644
--- a/quantum/quantum_keycodes_legacy.h
+++ b/quantum/quantum_keycodes_legacy.h
@@ -7,6 +7,8 @@
#define KC_LOCK QK_LOCK
#define VLK_TOG QK_VELOCIKEY_TOGGLE
+#define CAPSWRD QK_CAPS_WORD_TOGGLE
+#define CAPS_WORD QK_CAPS_WORD_TOGGLE
#define PROGRAMMABLE_BUTTON_1 QK_PROGRAMMABLE_BUTTON_1
#define PROGRAMMABLE_BUTTON_2 QK_PROGRAMMABLE_BUTTON_2