X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=tmk_core%2Fcommon%2Fkeymap.c;h=8955fc710d518665a7a9298afb12d7f2716cec65;hb=48871b9b6b99201abc381ee27cfd94e211ca131a;hp=9f4fab521662ab84f4069e30a45b6eec2d9337cf;hpb=7c3f14b7bbc155a74162a28c0eb82c3f4c39a54b;p=qmk_firmware.git diff --git a/tmk_core/common/keymap.c b/tmk_core/common/keymap.c index 9f4fab521..8955fc710 100644 --- a/tmk_core/common/keymap.c +++ b/tmk_core/common/keymap.c @@ -20,13 +20,15 @@ along with this program. If not, see . #include "action_layer.h" #include "action.h" #include "action_macro.h" +#include "wait.h" #include "debug.h" - +#include "bootloader.h" static action_t keycode_to_action(uint8_t keycode); /* converts key to action */ +__attribute__ ((weak)) action_t action_for_key(uint8_t layer, keypos_t key) { uint8_t keycode = keymap_key_to_keycode(layer, key); @@ -140,6 +142,12 @@ static action_t keycode_to_action(uint8_t keycode) case KC_TRNS: action.code = ACTION_TRANSPARENT; break; + case KC_BOOTLOADER: + action.code = ACTION_NO; + clear_keyboard(); + wait_ms(50); + bootloader_jump(); // not return + break; default: action.code = ACTION_NO; break;