Fix FORCE_NKRO handling (#7601)
This commit is contained in:
parent
071eb2478f
commit
efb21c00ce
2 changed files with 135 additions and 132 deletions
|
@ -39,10 +39,10 @@ float cg_swap_song[][2] = CG_SWAP_SONG;
|
||||||
*/
|
*/
|
||||||
bool process_magic(uint16_t keycode, keyrecord_t *record) {
|
bool process_magic(uint16_t keycode, keyrecord_t *record) {
|
||||||
// skip anything that isn't a keyup
|
// skip anything that isn't a keyup
|
||||||
if (!record->event.pressed) {
|
if (record->event.pressed) {
|
||||||
return true;
|
switch (keycode) {
|
||||||
}
|
case MAGIC_SWAP_CONTROL_CAPSLOCK ... MAGIC_TOGGLE_ALT_GUI:
|
||||||
|
case MAGIC_SWAP_LCTL_LGUI ... MAGIC_EE_HANDS_RIGHT:
|
||||||
/* keymap config */
|
/* keymap config */
|
||||||
keymap_config.raw = eeconfig_read_keymap();
|
keymap_config.raw = eeconfig_read_keymap();
|
||||||
switch (keycode) {
|
switch (keycode) {
|
||||||
|
@ -164,9 +164,6 @@ bool process_magic(uint16_t keycode, keyrecord_t *record) {
|
||||||
case MAGIC_EE_HANDS_RIGHT:
|
case MAGIC_EE_HANDS_RIGHT:
|
||||||
eeconfig_update_handedness(false);
|
eeconfig_update_handedness(false);
|
||||||
break;
|
break;
|
||||||
default:
|
|
||||||
// Not a magic keycode so continue processing
|
|
||||||
return true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
eeconfig_update_keymap(keymap_config.raw);
|
eeconfig_update_keymap(keymap_config.raw);
|
||||||
|
@ -174,3 +171,8 @@ bool process_magic(uint16_t keycode, keyrecord_t *record) {
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Not a magic keycode so continue processing
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
|
@ -254,6 +254,7 @@ void keyboard_init(void) {
|
||||||
#endif
|
#endif
|
||||||
#if defined(NKRO_ENABLE) && defined(FORCE_NKRO)
|
#if defined(NKRO_ENABLE) && defined(FORCE_NKRO)
|
||||||
keymap_config.nkro = 1;
|
keymap_config.nkro = 1;
|
||||||
|
eeconfig_update_keymap(keymap_config.raw);
|
||||||
#endif
|
#endif
|
||||||
keyboard_post_init_kb(); /* Always keep this last */
|
keyboard_post_init_kb(); /* Always keep this last */
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue