summaryrefslogtreecommitdiffstats
path: root/quantum/process_keycode
diff options
context:
space:
mode:
authorJoel Challis <git@zvecr.com>2023-02-22 21:14:29 +0000
committerGitHub <noreply@github.com>2023-02-23 08:14:29 +1100
commit403b0addea48548abdbde6203d8673f2b77164a7 (patch)
tree7ba874598d9bad640b0ec17ae1615cb700b14ae8 /quantum/process_keycode
parent93f2ed3abf909d06334ee51ac687abd782cf68d5 (diff)
Align magic keycodes (#19877)
Diffstat (limited to 'quantum/process_keycode')
-rw-r--r--quantum/process_keycode/process_magic.c70
1 files changed, 35 insertions, 35 deletions
diff --git a/quantum/process_keycode/process_magic.c b/quantum/process_keycode/process_magic.c
index 72332b20d7..5fafe8550f 100644
--- a/quantum/process_keycode/process_magic.c
+++ b/quantum/process_keycode/process_magic.c
@@ -44,99 +44,99 @@ bool process_magic(uint16_t keycode, keyrecord_t *record) {
/* keymap config */
keymap_config.raw = eeconfig_read_keymap();
switch (keycode) {
- case MAGIC_SWAP_CONTROL_CAPSLOCK:
+ case QK_MAGIC_SWAP_CONTROL_CAPS_LOCK:
keymap_config.swap_control_capslock = true;
break;
- case MAGIC_SWAP_ESCAPE_CAPSLOCK:
+ case QK_MAGIC_SWAP_ESCAPE_CAPS_LOCK:
keymap_config.swap_escape_capslock = true;
break;
- case MAGIC_CAPSLOCK_TO_CONTROL:
+ case QK_MAGIC_CAPS_LOCK_AS_CONTROL_ON:
keymap_config.capslock_to_control = true;
break;
- case MAGIC_SWAP_LALT_LGUI:
+ case QK_MAGIC_SWAP_LALT_LGUI:
keymap_config.swap_lalt_lgui = true;
break;
- case MAGIC_SWAP_RALT_RGUI:
+ case QK_MAGIC_SWAP_RALT_RGUI:
keymap_config.swap_ralt_rgui = true;
break;
- case MAGIC_SWAP_LCTL_LGUI:
+ case QK_MAGIC_SWAP_LCTL_LGUI:
keymap_config.swap_lctl_lgui = true;
break;
- case MAGIC_SWAP_RCTL_RGUI:
+ case QK_MAGIC_SWAP_RCTL_RGUI:
keymap_config.swap_rctl_rgui = true;
break;
- case MAGIC_NO_GUI:
+ case QK_MAGIC_GUI_OFF:
keymap_config.no_gui = true;
break;
- case MAGIC_SWAP_GRAVE_ESC:
+ case QK_MAGIC_SWAP_GRAVE_ESC:
keymap_config.swap_grave_esc = true;
break;
- case MAGIC_SWAP_BACKSLASH_BACKSPACE:
+ case QK_MAGIC_SWAP_BACKSLASH_BACKSPACE:
keymap_config.swap_backslash_backspace = true;
break;
- case MAGIC_HOST_NKRO:
+ case QK_MAGIC_NKRO_ON:
clear_keyboard(); // clear first buffer to prevent stuck keys
keymap_config.nkro = true;
break;
- case MAGIC_SWAP_ALT_GUI:
+ case QK_MAGIC_SWAP_ALT_GUI:
keymap_config.swap_lalt_lgui = keymap_config.swap_ralt_rgui = true;
#ifdef AUDIO_ENABLE
PLAY_SONG(ag_swap_song);
#endif
break;
- case MAGIC_SWAP_CTL_GUI:
+ case QK_MAGIC_SWAP_CTL_GUI:
keymap_config.swap_lctl_lgui = keymap_config.swap_rctl_rgui = true;
#ifdef AUDIO_ENABLE
PLAY_SONG(cg_swap_song);
#endif
break;
- case MAGIC_UNSWAP_CONTROL_CAPSLOCK:
+ case QK_MAGIC_UNSWAP_CONTROL_CAPS_LOCK:
keymap_config.swap_control_capslock = false;
break;
- case MAGIC_UNSWAP_ESCAPE_CAPSLOCK:
+ case QK_MAGIC_UNSWAP_ESCAPE_CAPS_LOCK:
keymap_config.swap_escape_capslock = false;
break;
- case MAGIC_UNCAPSLOCK_TO_CONTROL:
+ case QK_MAGIC_CAPS_LOCK_AS_CONTROL_OFF:
keymap_config.capslock_to_control = false;
break;
- case MAGIC_UNSWAP_LALT_LGUI:
+ case QK_MAGIC_UNSWAP_LALT_LGUI:
keymap_config.swap_lalt_lgui = false;
break;
- case MAGIC_UNSWAP_RALT_RGUI:
+ case QK_MAGIC_UNSWAP_RALT_RGUI:
keymap_config.swap_ralt_rgui = false;
break;
- case MAGIC_UNSWAP_LCTL_LGUI:
+ case QK_MAGIC_UNSWAP_LCTL_LGUI:
keymap_config.swap_lctl_lgui = false;
break;
- case MAGIC_UNSWAP_RCTL_RGUI:
+ case QK_MAGIC_UNSWAP_RCTL_RGUI:
keymap_config.swap_rctl_rgui = false;
break;
- case MAGIC_UNNO_GUI:
+ case QK_MAGIC_GUI_ON:
keymap_config.no_gui = false;
break;
- case MAGIC_UNSWAP_GRAVE_ESC:
+ case QK_MAGIC_UNSWAP_GRAVE_ESC:
keymap_config.swap_grave_esc = false;
break;
- case MAGIC_UNSWAP_BACKSLASH_BACKSPACE:
+ case QK_MAGIC_UNSWAP_BACKSLASH_BACKSPACE:
keymap_config.swap_backslash_backspace = false;
break;
- case MAGIC_UNHOST_NKRO:
+ case QK_MAGIC_NKRO_OFF:
clear_keyboard(); // clear first buffer to prevent stuck keys
keymap_config.nkro = false;
break;
- case MAGIC_UNSWAP_ALT_GUI:
+ case QK_MAGIC_UNSWAP_ALT_GUI:
keymap_config.swap_lalt_lgui = keymap_config.swap_ralt_rgui = false;
#ifdef AUDIO_ENABLE
PLAY_SONG(ag_norm_song);
#endif
break;
- case MAGIC_UNSWAP_CTL_GUI:
+ case QK_MAGIC_UNSWAP_CTL_GUI:
keymap_config.swap_lctl_lgui = keymap_config.swap_rctl_rgui = false;
#ifdef AUDIO_ENABLE
PLAY_SONG(cg_norm_song);
#endif
break;
- case MAGIC_TOGGLE_ALT_GUI:
+ case QK_MAGIC_TOGGLE_ALT_GUI:
keymap_config.swap_lalt_lgui = !keymap_config.swap_lalt_lgui;
keymap_config.swap_ralt_rgui = keymap_config.swap_lalt_lgui;
#ifdef AUDIO_ENABLE
@@ -147,7 +147,7 @@ bool process_magic(uint16_t keycode, keyrecord_t *record) {
}
#endif
break;
- case MAGIC_TOGGLE_CTL_GUI:
+ case QK_MAGIC_TOGGLE_CTL_GUI:
keymap_config.swap_lctl_lgui = !keymap_config.swap_lctl_lgui;
keymap_config.swap_rctl_rgui = keymap_config.swap_lctl_lgui;
#ifdef AUDIO_ENABLE
@@ -158,26 +158,26 @@ bool process_magic(uint16_t keycode, keyrecord_t *record) {
}
#endif
break;
- case MAGIC_TOGGLE_BACKSLASH_BACKSPACE:
+ case QK_MAGIC_TOGGLE_BACKSLASH_BACKSPACE:
keymap_config.swap_backslash_backspace = !keymap_config.swap_backslash_backspace;
break;
- case MAGIC_TOGGLE_NKRO:
+ case QK_MAGIC_TOGGLE_NKRO:
clear_keyboard(); // clear first buffer to prevent stuck keys
keymap_config.nkro = !keymap_config.nkro;
break;
- case MAGIC_EE_HANDS_LEFT:
+ case QK_MAGIC_EE_HANDS_LEFT:
eeconfig_update_handedness(true);
break;
- case MAGIC_EE_HANDS_RIGHT:
+ case QK_MAGIC_EE_HANDS_RIGHT:
eeconfig_update_handedness(false);
break;
- case MAGIC_TOGGLE_GUI:
+ case QK_MAGIC_TOGGLE_GUI:
keymap_config.no_gui = !keymap_config.no_gui;
break;
- case MAGIC_TOGGLE_CONTROL_CAPSLOCK:
+ case QK_MAGIC_TOGGLE_CONTROL_CAPS_LOCK:
keymap_config.swap_control_capslock = !keymap_config.swap_control_capslock;
break;
- case MAGIC_TOGGLE_ESCAPE_CAPSLOCK:
+ case QK_MAGIC_TOGGLE_ESCAPE_CAPS_LOCK:
keymap_config.swap_escape_capslock = !keymap_config.swap_escape_capslock;
break;
}