forked from mirrors/qmk_userspace
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.
This commit is contained in:
parent
894a387d1f
commit
e5bafff725
6 changed files with 15 additions and 1 deletions
|
@ -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); }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue