X-Git-Url: https://git.friedersdorff.com/?a=blobdiff_plain;f=tmk_core%2Fcommon%2Faction.c;h=85a0631ffe3960a14220d0a2a41c4165110e7675;hb=c6a6049bc85609b05a6502dbbed524d669b2b7a5;hp=9b139d48b155828b0aa9845f9e564c92d04d0b7e;hpb=d415e99f0c3c562ee1fdc98d25e37202c05386c1;p=max%2Ftmk_keyboard.git diff --git a/tmk_core/common/action.c b/tmk_core/common/action.c index 9b139d48..85a0631f 100644 --- a/tmk_core/common/action.c +++ b/tmk_core/common/action.c @@ -1,5 +1,5 @@ /* -Copyright 2012,2013 Jun Wako +Copyright 2012,2013,2020 Jun Wako This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -28,6 +28,7 @@ along with this program. If not, see . #include "action.h" #include "hook.h" #include "wait.h" +#include "bootloader.h" #ifdef DEBUG_ACTION #include "debug.h" @@ -58,6 +59,8 @@ void action_exec(keyevent_t event) void process_action(keyrecord_t *record) { + if (hook_process_action(record)) return; + keyevent_t event = record->event; #ifndef NO_ACTION_TAPPING uint8_t tap_count = record->tap.count; @@ -339,6 +342,15 @@ void process_action(keyrecord_t *record) break; #endif case ACT_COMMAND: + switch (action.command.id) { + case COMMAND_BOOTLOADER: + if (event.pressed) { + clear_keyboard(); + wait_ms(50); + bootloader_jump(); + } + break; + } break; #ifndef NO_ACTION_FUNCTION case ACT_FUNCTION: