diff options
author | tmk <nobody@nowhere> | 2013-07-24 00:41:28 +0900 |
---|---|---|
committer | tmk <nobody@nowhere> | 2013-07-24 00:41:28 +0900 |
commit | 05225dd9d8b666fec75ff5f1824f82fdfe7c0a77 (patch) | |
tree | 5812fd31a0c58c74d252bb638a736ee133cfa7c0 /common/bootmagic.c | |
parent | 7e5081b5a8f2c6e0c3c8d2dc73717c0b3597ef84 (diff) | |
download | qmk_firmware-05225dd9d8b666fec75ff5f1824f82fdfe7c0a77.tar.gz qmk_firmware-05225dd9d8b666fec75ff5f1824f82fdfe7c0a77.zip |
Add bootmagic salt key to avoid accidental configuration
Diffstat (limited to 'common/bootmagic.c')
-rw-r--r-- | common/bootmagic.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/common/bootmagic.c b/common/bootmagic.c index 11eef3c3c6..410dc68364 100644 --- a/common/bootmagic.c +++ b/common/bootmagic.c @@ -5,6 +5,7 @@ #include "bootloader.h" #include "debug.h" #include "keymap.h" +#include "action_layer.h" #include "eeconfig.h" #include "bootmagic.h" @@ -94,7 +95,7 @@ void bootmagic(void) } } -bool bootmagic_scan_keycode(uint8_t keycode) +static bool scan_keycode(uint8_t keycode) { for (uint8_t r = 0; r < MATRIX_ROWS; r++) { matrix_row_t matrix_row = matrix_get_row(r); @@ -108,3 +109,10 @@ bool bootmagic_scan_keycode(uint8_t keycode) } return false; } + +bool bootmagic_scan_keycode(uint8_t keycode) +{ + if (!scan_keycode(BOOTMAGIC_KEY_SALT)) return false; + + return scan_keycode(keycode); +} |