From e5bafff725f7b9cbfc364e64c74ea7f68bfc9900 Mon Sep 17 00:00:00 2001 From: Shayne Holmes Date: Wed, 9 Apr 2014 15:54:16 -0700 Subject: Adding NKRO virtual dip-switch, using existing bit in keymap byte. This takes the last, reserved bit there, but doesn't necessitate a revision to the magic number because it doesn't alter byte order. Add reference to NKRO virtual dip-switch to documentation. --- common/bootmagic.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'common/bootmagic.c') 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); } -- cgit v1.2.3