]> git.donarmstrong.com Git - qmk_firmware.git/blobdiff - tmk_core/common/keymap.c
Merge branch 'master' of https://github.com/jackhumbert/qmk_firmware
[qmk_firmware.git] / tmk_core / common / keymap.c
index 9f4fab521662ab84f4069e30a45b6eec2d9337cf..8955fc710d518665a7a9298afb12d7f2716cec65 100644 (file)
@@ -20,13 +20,15 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #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;