summaryrefslogtreecommitdiff
path: root/quantum
diff options
context:
space:
mode:
Diffstat (limited to 'quantum')
-rw-r--r--quantum/quantum.c8
-rw-r--r--quantum/quantum_keycodes.h2
-rw-r--r--quantum/split_common/split_util.c3
3 files changed, 10 insertions, 3 deletions
diff --git a/quantum/quantum.c b/quantum/quantum.c
index 82c7a5265b..09452ed4ef 100644
--- a/quantum/quantum.c
+++ b/quantum/quantum.c
@@ -534,7 +534,7 @@ bool process_record_quantum(keyrecord_t *record) {
# endif
#endif
case MAGIC_SWAP_CONTROL_CAPSLOCK ... MAGIC_TOGGLE_ALT_GUI:
- case MAGIC_SWAP_LCTL_LGUI ... MAGIC_TOGGLE_CTL_GUI:
+ case MAGIC_SWAP_LCTL_LGUI ... MAGIC_EE_HANDS_RIGHT:
if (record->event.pressed) {
// MAGIC actions (BOOTMAGIC without the boot)
if (!eeconfig_is_enabled()) {
@@ -655,6 +655,12 @@ bool process_record_quantum(keyrecord_t *record) {
clear_keyboard(); // clear first buffer to prevent stuck keys
keymap_config.nkro = !keymap_config.nkro;
break;
+ case MAGIC_EE_HANDS_LEFT:
+ eeconfig_update_handedness(true);
+ break;
+ case MAGIC_EE_HANDS_RIGHT:
+ eeconfig_update_handedness(false);
+ break;
default:
break;
}
diff --git a/quantum/quantum_keycodes.h b/quantum/quantum_keycodes.h
index 6897b54b09..faae942ce4 100644
--- a/quantum/quantum_keycodes.h
+++ b/quantum/quantum_keycodes.h
@@ -502,6 +502,8 @@ enum quantum_keycodes {
MAGIC_SWAP_CTL_GUI,
MAGIC_UNSWAP_CTL_GUI,
MAGIC_TOGGLE_CTL_GUI,
+ MAGIC_EE_HANDS_LEFT,
+ MAGIC_EE_HANDS_RIGHT,
WEBUSB_PAIR,
diff --git a/quantum/split_common/split_util.c b/quantum/split_common/split_util.c
index 5114b188ec..d16a989770 100644
--- a/quantum/split_common/split_util.c
+++ b/quantum/split_common/split_util.c
@@ -7,7 +7,6 @@
#include "quantum.h"
#ifdef EE_HANDS
-# include "tmk_core/common/eeprom.h"
# include "eeconfig.h"
#endif
@@ -23,7 +22,7 @@ __attribute__((weak)) bool is_keyboard_left(void) {
setPinInput(SPLIT_HAND_PIN);
return readPin(SPLIT_HAND_PIN);
#elif defined(EE_HANDS)
- return eeprom_read_byte(EECONFIG_HANDEDNESS);
+ return eeconfig_read_handedness();
#elif defined(MASTER_RIGHT)
return !is_keyboard_master();
#endif