aboutsummaryrefslogtreecommitdiff
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 ec80fa557..16922dd01 100644
--- a/quantum/quantum.c
+++ b/quantum/quantum.c
@@ -544,7 +544,7 @@ bool process_record_quantum(keyrecord_t *record) {
544# endif 544# endif
545#endif 545#endif
546 case MAGIC_SWAP_CONTROL_CAPSLOCK ... MAGIC_TOGGLE_ALT_GUI: 546 case MAGIC_SWAP_CONTROL_CAPSLOCK ... MAGIC_TOGGLE_ALT_GUI:
547 case MAGIC_SWAP_LCTL_LGUI ... MAGIC_TOGGLE_CTL_GUI: 547 case MAGIC_SWAP_LCTL_LGUI ... MAGIC_EE_HANDS_RIGHT:
548 if (record->event.pressed) { 548 if (record->event.pressed) {
549 // MAGIC actions (BOOTMAGIC without the boot) 549 // MAGIC actions (BOOTMAGIC without the boot)
550 if (!eeconfig_is_enabled()) { 550 if (!eeconfig_is_enabled()) {
@@ -662,6 +662,12 @@ bool process_record_quantum(keyrecord_t *record) {
662 case MAGIC_TOGGLE_NKRO: 662 case MAGIC_TOGGLE_NKRO:
663 keymap_config.nkro = !keymap_config.nkro; 663 keymap_config.nkro = !keymap_config.nkro;
664 break; 664 break;
665 case MAGIC_EE_HANDS_LEFT:
666 eeconfig_update_handedness(true);
667 break;
668 case MAGIC_EE_HANDS_RIGHT:
669 eeconfig_update_handedness(false);
670 break;
665 default: 671 default:
666 break; 672 break;
667 } 673 }
diff --git a/quantum/quantum_keycodes.h b/quantum/quantum_keycodes.h
index af984a7cd..5fac6a5ca 100644
--- a/quantum/quantum_keycodes.h
+++ b/quantum/quantum_keycodes.h
@@ -502,6 +502,8 @@ enum quantum_keycodes {
502 MAGIC_SWAP_CTL_GUI, 502 MAGIC_SWAP_CTL_GUI,
503 MAGIC_UNSWAP_CTL_GUI, 503 MAGIC_UNSWAP_CTL_GUI,
504 MAGIC_TOGGLE_CTL_GUI, 504 MAGIC_TOGGLE_CTL_GUI,
505 MAGIC_EE_HANDS_LEFT,
506 MAGIC_EE_HANDS_RIGHT,
505 507
506 // always leave at the end 508 // always leave at the end
507 SAFE_RANGE 509 SAFE_RANGE
diff --git a/quantum/split_common/split_util.c b/quantum/split_common/split_util.c
index 5114b188e..d16a98977 100644
--- a/quantum/split_common/split_util.c
+++ b/quantum/split_common/split_util.c
@@ -7,7 +7,6 @@
7#include "quantum.h" 7#include "quantum.h"
8 8
9#ifdef EE_HANDS 9#ifdef EE_HANDS
10# include "tmk_core/common/eeprom.h"
11# include "eeconfig.h" 10# include "eeconfig.h"
12#endif 11#endif
13 12
@@ -23,7 +22,7 @@ __attribute__((weak)) bool is_keyboard_left(void) {
23 setPinInput(SPLIT_HAND_PIN); 22 setPinInput(SPLIT_HAND_PIN);
24 return readPin(SPLIT_HAND_PIN); 23 return readPin(SPLIT_HAND_PIN);
25#elif defined(EE_HANDS) 24#elif defined(EE_HANDS)
26 return eeprom_read_byte(EECONFIG_HANDEDNESS); 25 return eeconfig_read_handedness();
27#elif defined(MASTER_RIGHT) 26#elif defined(MASTER_RIGHT)
28 return !is_keyboard_master(); 27 return !is_keyboard_master();
29#endif 28#endif