summaryrefslogtreecommitdiffstats
path: root/common/bootmagic.c
diff options
context:
space:
mode:
Diffstat (limited to 'common/bootmagic.c')
-rw-r--r--common/bootmagic.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/common/bootmagic.c b/common/bootmagic.c
index 036d490440..642d5face4 100644
--- a/common/bootmagic.c
+++ b/common/bootmagic.c
@@ -5,6 +5,7 @@
#include "bootloader.h"
#include "debug.h"
#include "keymap.h"
+#include "host.h"
#include "action_layer.h"
#include "eeconfig.h"
#include "bootmagic.h"
@@ -76,8 +77,15 @@ void bootmagic(void)
if (bootmagic_scan_keycode(BOOTMAGIC_KEY_SWAP_BACKSLASH_BACKSPACE)) {
keymap_config.swap_backslash_backspace = !keymap_config.swap_backslash_backspace;
}
+ if (bootmagic_scan_keycode(BOOTMAGIC_HOST_NKRO)) {
+ keymap_config.nkro = !keymap_config.nkro;
+ }
eeconfig_write_keymap(keymap_config.raw);
+#ifdef NKRO_ENABLE
+ keyboard_nkro = keymap_config.nkro;
+#endif
+
/* default layer */
uint8_t default_layer = 0;
if (bootmagic_scan_keycode(BOOTMAGIC_KEY_DEFAULT_LAYER_0)) { default_layer |= (1<<0); }