ARM split - Add bootmagic/magic keycodes for setting handedness (#6545)
* Add docs on bootmagic/magic keycodes for setting handedness * Clang format fixes * Maintain backwards compatibility * Maintain backwards compatibility
This commit is contained in:
parent
237147ca23
commit
ad8dbd5ca5
9 changed files with 80 additions and 33 deletions
|
@ -544,7 +544,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()) {
|
||||
|
@ -662,6 +662,12 @@ bool process_record_quantum(keyrecord_t *record) {
|
|||
case MAGIC_TOGGLE_NKRO:
|
||||
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;
|
||||
}
|
||||
|
|
|
@ -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,
|
||||
|
||||
// always leave at the end
|
||||
SAFE_RANGE
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue