summaryrefslogtreecommitdiffstats
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.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/quantum/process_keycode/process_magic.c b/quantum/process_keycode/process_magic.c
index 10161adda3..ae60f29bf5 100644
--- a/quantum/process_keycode/process_magic.c
+++ b/quantum/process_keycode/process_magic.c
@@ -45,12 +45,16 @@ bool process_magic(uint16_t keycode, keyrecord_t *record) {
case MAGIC_SWAP_LCTL_LGUI ... MAGIC_EE_HANDS_RIGHT:
case MAGIC_TOGGLE_GUI:
case MAGIC_TOGGLE_CONTROL_CAPSLOCK:
+ case MAGIC_SWAP_ESCAPE_CAPSLOCK ... MAGIC_TOGGLE_ESCAPE_CAPSLOCK:
/* keymap config */
keymap_config.raw = eeconfig_read_keymap();
switch (keycode) {
case MAGIC_SWAP_CONTROL_CAPSLOCK:
keymap_config.swap_control_capslock = true;
break;
+ case MAGIC_SWAP_ESCAPE_CAPSLOCK:
+ keymap_config.swap_escape_capslock = true;
+ break;
case MAGIC_CAPSLOCK_TO_CONTROL:
keymap_config.capslock_to_control = true;
break;
@@ -94,6 +98,9 @@ bool process_magic(uint16_t keycode, keyrecord_t *record) {
case MAGIC_UNSWAP_CONTROL_CAPSLOCK:
keymap_config.swap_control_capslock = false;
break;
+ case MAGIC_UNSWAP_ESCAPE_CAPSLOCK:
+ keymap_config.swap_escape_capslock = false;
+ break;
case MAGIC_UNCAPSLOCK_TO_CONTROL:
keymap_config.capslock_to_control = false;
break;
@@ -172,6 +179,9 @@ bool process_magic(uint16_t keycode, keyrecord_t *record) {
case MAGIC_TOGGLE_CONTROL_CAPSLOCK:
keymap_config.swap_control_capslock = !keymap_config.swap_control_capslock;
break;
+ case MAGIC_TOGGLE_ESCAPE_CAPSLOCK:
+ keymap_config.swap_escape_capslock = !keymap_config.swap_escape_capslock;
+ break;
}
eeconfig_update_keymap(keymap_config.raw);