summaryrefslogtreecommitdiff
path: root/quantum
diff options
context:
space:
mode:
Diffstat (limited to 'quantum')
-rw-r--r--quantum/process_keycode/process_magic.c4
-rw-r--r--quantum/quantum_keycodes.h3
2 files changed, 7 insertions, 0 deletions
diff --git a/quantum/process_keycode/process_magic.c b/quantum/process_keycode/process_magic.c
index ae60f29bf5..50816c5261 100644
--- a/quantum/process_keycode/process_magic.c
+++ b/quantum/process_keycode/process_magic.c
@@ -45,6 +45,7 @@ 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_TOGGLE_BACKSLASH_BACKSPACE:
case MAGIC_SWAP_ESCAPE_CAPSLOCK ... MAGIC_TOGGLE_ESCAPE_CAPSLOCK:
/* keymap config */
keymap_config.raw = eeconfig_read_keymap();
@@ -163,6 +164,9 @@ bool process_magic(uint16_t keycode, keyrecord_t *record) {
}
#endif
break;
+ case MAGIC_TOGGLE_BACKSLASH_BACKSPACE:
+ keymap_config.swap_backslash_backspace = !keymap_config.swap_backslash_backspace;
+ break;
case MAGIC_TOGGLE_NKRO:
clear_keyboard(); // clear first buffer to prevent stuck keys
keymap_config.nkro = !keymap_config.nkro;
diff --git a/quantum/quantum_keycodes.h b/quantum/quantum_keycodes.h
index 2e2ba8cd81..7bd270cfd5 100644
--- a/quantum/quantum_keycodes.h
+++ b/quantum/quantum_keycodes.h
@@ -615,6 +615,8 @@ enum quantum_keycodes {
AUTOCORRECT_OFF,
AUTOCORRECT_TOGGLE,
+ MAGIC_TOGGLE_BACKSLASH_BACKSPACE,
+
// Start of custom keycode range for keyboards and keymaps - always leave at the end
SAFE_RANGE
};
@@ -731,6 +733,7 @@ enum quantum_keycodes {
#define BS_SWAP MAGIC_SWAP_BACKSLASH_BACKSPACE
#define BS_NORM MAGIC_UNSWAP_BACKSLASH_BACKSPACE
+#define BS_TOGG MAGIC_TOGGLE_BACKSLASH_BACKSPACE
#define NK_ON MAGIC_HOST_NKRO
#define NK_OFF MAGIC_UNHOST_NKRO