summaryrefslogtreecommitdiffstats
path: root/quantum
diff options
context:
space:
mode:
authorRyan <fauxpark@gmail.com>2022-10-27 21:19:16 +1100
committerGitHub <noreply@github.com>2022-10-27 11:19:16 +0100
commit002b58f0e4ea64eb5b06e36d988160bbb907cb83 (patch)
tree10ffe1f49d22b4ad6d660198da56782aae57e743 /quantum
parent8e0945c82224ca2fdcc21eb7184520f879804fb6 (diff)
Normalise Space Cadet keycodes (#18864)
Diffstat (limited to 'quantum')
-rw-r--r--quantum/process_keycode/process_space_cadet.c14
-rw-r--r--quantum/quantum_keycodes.h22
-rw-r--r--quantum/quantum_keycodes_legacy.h8
-rw-r--r--quantum/via_ensure_keycode.h14
4 files changed, 37 insertions, 21 deletions
diff --git a/quantum/process_keycode/process_space_cadet.c b/quantum/process_keycode/process_space_cadet.c
index 0997e7b7f3..a62cd60a70 100644
--- a/quantum/process_keycode/process_space_cadet.c
+++ b/quantum/process_keycode/process_space_cadet.c
@@ -122,31 +122,31 @@ void perform_space_cadet(keyrecord_t *record, uint16_t sc_keycode, uint8_t holdM
bool process_space_cadet(uint16_t keycode, keyrecord_t *record) {
switch (keycode) {
- case KC_LSPO: {
+ case QK_SPACE_CADET_LEFT_SHIFT_PARENTHESIS_OPEN: {
perform_space_cadet(record, keycode, LSPO_KEYS);
return false;
}
- case KC_RSPC: {
+ case QK_SPACE_CADET_RIGHT_SHIFT_PARENTHESIS_CLOSE: {
perform_space_cadet(record, keycode, RSPC_KEYS);
return false;
}
- case KC_LCPO: {
+ case QK_SPACE_CADET_LEFT_CTRL_PARENTHESIS_OPEN: {
perform_space_cadet(record, keycode, LCPO_KEYS);
return false;
}
- case KC_RCPC: {
+ case QK_SPACE_CADET_RIGHT_CTRL_PARENTHESIS_CLOSE: {
perform_space_cadet(record, keycode, RCPC_KEYS);
return false;
}
- case KC_LAPO: {
+ case QK_SPACE_CADET_LEFT_ALT_PARENTHESIS_OPEN: {
perform_space_cadet(record, keycode, LAPO_KEYS);
return false;
}
- case KC_RAPC: {
+ case QK_SPACE_CADET_RIGHT_ALT_PARENTHESIS_CLOSE: {
perform_space_cadet(record, keycode, RAPC_KEYS);
return false;
}
- case KC_SFTENT: {
+ case QK_SPACE_CADET_RIGHT_SHIFT_ENTER: {
perform_space_cadet(record, keycode, SFTENT_KEYS);
return false;
}
diff --git a/quantum/quantum_keycodes.h b/quantum/quantum_keycodes.h
index c5b9342b17..c2b707fbf0 100644
--- a/quantum/quantum_keycodes.h
+++ b/quantum/quantum_keycodes.h
@@ -362,9 +362,9 @@ enum quantum_keycodes {
QK_VELOCIKEY_TOGGLE, // 5CD7
// Space Cadet
- KC_LSPO, // 5CD8
- KC_RSPC, // 5CD9
- KC_SFTENT, // 5CDA
+ QK_SPACE_CADET_LEFT_SHIFT_PARENTHESIS_OPEN, // 5CD8
+ QK_SPACE_CADET_RIGHT_SHIFT_PARENTHESIS_CLOSE, // 5CD9
+ QK_SPACE_CADET_RIGHT_SHIFT_ENTER, // 5CDA
// Thermal Printer
PRINT_ON, // 5CDB
@@ -402,10 +402,10 @@ enum quantum_keycodes {
HPT_DWLD, // 5CF3
// Space Cadet (continued)
- KC_LCPO, // 5CF4
- KC_RCPC, // 5CF5
- KC_LAPO, // 5CF6
- KC_RAPC, // 5CF7
+ QK_SPACE_CADET_LEFT_CTRL_PARENTHESIS_OPEN, // 5CF4
+ QK_SPACE_CADET_RIGHT_CTRL_PARENTHESIS_CLOSE, // 5CF5
+ QK_SPACE_CADET_LEFT_ALT_PARENTHESIS_OPEN, // 5CF6
+ QK_SPACE_CADET_RIGHT_ALT_PARENTHESIS_CLOSE, // 5CF7
// Combos
CMB_ON, // 5CF8
@@ -863,6 +863,14 @@ enum quantum_keycodes {
#define SE_TOGG QK_SECURE_TOGGLE
#define SE_REQ QK_SECURE_REQUEST
+// Space Cadet
+#define SC_LSPO QK_SPACE_CADET_LEFT_SHIFT_PARENTHESIS_OPEN
+#define SC_RSPC QK_SPACE_CADET_RIGHT_SHIFT_PARENTHESIS_CLOSE
+#define SC_LCPO QK_SPACE_CADET_LEFT_CTRL_PARENTHESIS_OPEN
+#define SC_RCPC QK_SPACE_CADET_RIGHT_CTRL_PARENTHESIS_CLOSE
+#define SC_LAPO QK_SPACE_CADET_LEFT_ALT_PARENTHESIS_OPEN
+#define SC_RAPC QK_SPACE_CADET_RIGHT_ALT_PARENTHESIS_CLOSE
+
// 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 652aaaa9a8..92ec68b622 100644
--- a/quantum/quantum_keycodes_legacy.h
+++ b/quantum/quantum_keycodes_legacy.h
@@ -89,6 +89,14 @@
#define SECURE_TOGGLE QK_SECURE_TOGGLE
#define SECURE_REQUEST QK_SECURE_REQUEST
+#define KC_LSPO QK_SPACE_CADET_LEFT_SHIFT_PARENTHESIS_OPEN
+#define KC_RSPC QK_SPACE_CADET_RIGHT_SHIFT_PARENTHESIS_CLOSE
+#define KC_LCPO QK_SPACE_CADET_LEFT_CTRL_PARENTHESIS_OPEN
+#define KC_RCPC QK_SPACE_CADET_RIGHT_CTRL_PARENTHESIS_CLOSE
+#define KC_LAPO QK_SPACE_CADET_LEFT_ALT_PARENTHESIS_OPEN
+#define KC_RAPC QK_SPACE_CADET_RIGHT_ALT_PARENTHESIS_CLOSE
+#define KC_SFTENT QK_SPACE_CADET_RIGHT_SHIFT_ENTER
+
#define TERM_ON _Static_assert(false, "The Terminal feature has been removed from QMK. Please remove use of TERM_ON/TERM_OFF from your keymap.")
#define TERM_OFF _Static_assert(false, "The Terminal feature has been removed from QMK.. Please remove use of TERM_ON/TERM_OFF from your keymap.")
// #define RESET _Static_assert(false, "The RESET keycode has been removed from QMK.. Please remove use from your keymap.")
diff --git a/quantum/via_ensure_keycode.h b/quantum/via_ensure_keycode.h
index 010e1d92d4..48e611d0fa 100644
--- a/quantum/via_ensure_keycode.h
+++ b/quantum/via_ensure_keycode.h
@@ -296,14 +296,14 @@ _Static_assert(RGB_M_X == 0x5CD3, "");
_Static_assert(RGB_M_G == 0x5CD4, "");
_Static_assert(RGB_M_T == 0x5CD5, "");
-_Static_assert(KC_LSPO == 0x5CD7, "");
-_Static_assert(KC_RSPC == 0x5CD8, "");
-_Static_assert(KC_SFTENT == 0x5CD9, "");
+_Static_assert(SC_LSPO == 0x5CD7, "");
+_Static_assert(SC_RSPC == 0x5CD8, "");
+_Static_assert(SC_SENT == 0x5CD9, "");
-_Static_assert(KC_LCPO == 0x5CF3, "");
-_Static_assert(KC_RCPC == 0x5CF4, "");
-_Static_assert(KC_LAPO == 0x5CF5, "");
-_Static_assert(KC_RAPC == 0x5CF6, "");
+_Static_assert(SC_LCPO == 0x5CF3, "");
+_Static_assert(SC_RCPC == 0x5CF4, "");
+_Static_assert(SC_LAPO == 0x5CF5, "");
+_Static_assert(SC_RAPC == 0x5CF6, "");
_Static_assert(FN_MO13 == 0x5F10, "");
_Static_assert(FN_MO23 == 0x5F11, "");