summaryrefslogtreecommitdiff
path: root/quantum/process_keycode/process_magic.c
diff options
context:
space:
mode:
Diffstat (limited to 'quantum/process_keycode/process_magic.c')
-rw-r--r--quantum/process_keycode/process_magic.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/quantum/process_keycode/process_magic.c b/quantum/process_keycode/process_magic.c
index d5cff4f12a..10161adda3 100644
--- a/quantum/process_keycode/process_magic.c
+++ b/quantum/process_keycode/process_magic.c
@@ -44,6 +44,7 @@ bool process_magic(uint16_t keycode, keyrecord_t *record) {
case MAGIC_SWAP_CONTROL_CAPSLOCK ... MAGIC_TOGGLE_ALT_GUI:
case MAGIC_SWAP_LCTL_LGUI ... MAGIC_EE_HANDS_RIGHT:
case MAGIC_TOGGLE_GUI:
+ case MAGIC_TOGGLE_CONTROL_CAPSLOCK:
/* keymap config */
keymap_config.raw = eeconfig_read_keymap();
switch (keycode) {
@@ -75,7 +76,7 @@ bool process_magic(uint16_t keycode, keyrecord_t *record) {
keymap_config.swap_backslash_backspace = true;
break;
case MAGIC_HOST_NKRO:
- clear_keyboard(); // clear first buffer to prevent stuck keys
+ clear_keyboard(); // clear first buffer to prevent stuck keys
keymap_config.nkro = true;
break;
case MAGIC_SWAP_ALT_GUI:
@@ -118,7 +119,7 @@ bool process_magic(uint16_t keycode, keyrecord_t *record) {
keymap_config.swap_backslash_backspace = false;
break;
case MAGIC_UNHOST_NKRO:
- clear_keyboard(); // clear first buffer to prevent stuck keys
+ clear_keyboard(); // clear first buffer to prevent stuck keys
keymap_config.nkro = false;
break;
case MAGIC_UNSWAP_ALT_GUI:
@@ -156,7 +157,7 @@ bool process_magic(uint16_t keycode, keyrecord_t *record) {
#endif
break;
case MAGIC_TOGGLE_NKRO:
- clear_keyboard(); // clear first buffer to prevent stuck keys
+ clear_keyboard(); // clear first buffer to prevent stuck keys
keymap_config.nkro = !keymap_config.nkro;
break;
case MAGIC_EE_HANDS_LEFT:
@@ -168,10 +169,13 @@ bool process_magic(uint16_t keycode, keyrecord_t *record) {
case MAGIC_TOGGLE_GUI:
keymap_config.no_gui = !keymap_config.no_gui;
break;
+ case MAGIC_TOGGLE_CONTROL_CAPSLOCK:
+ keymap_config.swap_control_capslock = !keymap_config.swap_control_capslock;
+ break;
}
eeconfig_update_keymap(keymap_config.raw);
- clear_keyboard(); // clear to prevent stuck keys
+ clear_keyboard(); // clear to prevent stuck keys
return false;
}