summaryrefslogtreecommitdiff
path: root/quantum/process_keycode
diff options
context:
space:
mode:
authorJoel Challis <git@zvecr.com>2021-12-01 01:34:08 +0000
committerGitHub <noreply@github.com>2021-11-30 17:34:08 -0800
commit2726856cde66856344de7790d750a332ace1070d (patch)
tree9ec92a6e39a8dc11846b2fe333a6896fb7000268 /quantum/process_keycode
parent3079fd0415c60a72c5c18601a6fa3d196bb9215d (diff)
downloadqmk_firmware-2726856cde66856344de7790d750a332ace1070d.tar.gz
qmk_firmware-2726856cde66856344de7790d750a332ace1070d.zip
Implement MAGIC_TOGGLE_CONTROL_CAPSLOCK (#15368)
Diffstat (limited to 'quantum/process_keycode')
-rw-r--r--quantum/process_keycode/process_magic.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/quantum/process_keycode/process_magic.c b/quantum/process_keycode/process_magic.c
index d5cff4f12a..6332be647c 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) {
@@ -168,6 +169,9 @@ 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);