aboutsummaryrefslogtreecommitdiff
path: root/tmk_core/common/action.c
diff options
context:
space:
mode:
Diffstat (limited to 'tmk_core/common/action.c')
-rw-r--r--tmk_core/common/action.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/tmk_core/common/action.c b/tmk_core/common/action.c
index 4ba1cc251..a534f818e 100644
--- a/tmk_core/common/action.c
+++ b/tmk_core/common/action.c
@@ -26,6 +26,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
26#include "action_macro.h" 26#include "action_macro.h"
27#include "action_util.h" 27#include "action_util.h"
28#include "action.h" 28#include "action.h"
29#include "wait.h"
29 30
30#ifdef DEBUG_ACTION 31#ifdef DEBUG_ACTION
31#include "debug.h" 32#include "debug.h"
@@ -438,6 +439,9 @@ void process_action(keyrecord_t *record, action_t action)
438 } else { 439 } else {
439 if (tap_count > 0) { 440 if (tap_count > 0) {
440 dprint("KEYMAP_TAP_KEY: Tap: unregister_code\n"); 441 dprint("KEYMAP_TAP_KEY: Tap: unregister_code\n");
442 if (action.layer_tap.code == KC_CAPS) {
443 wait_ms(80);
444 }
441 unregister_code(action.layer_tap.code); 445 unregister_code(action.layer_tap.code);
442 } else { 446 } else {
443 dprint("KEYMAP_TAP_KEY: No tap: Off on release\n"); 447 dprint("KEYMAP_TAP_KEY: No tap: Off on release\n");
@@ -537,6 +541,21 @@ void process_action(keyrecord_t *record, action_t action)
537 break; 541 break;
538 } 542 }
539 543
544#ifndef NO_ACTION_LAYER
545 // if this event is a layer action, update the leds
546 switch (action.kind.id) {
547 case ACT_LAYER:
548 #ifndef NO_ACTION_TAPPING
549 case ACT_LAYER_TAP:
550 case ACT_LAYER_TAP_EXT:
551 #endif
552 led_set(host_keyboard_leds());
553 break;
554 default:
555 break;
556 }
557#endif
558
540#ifndef NO_ACTION_ONESHOT 559#ifndef NO_ACTION_ONESHOT
541 /* Because we switch layers after a oneshot event, we need to release the 560 /* Because we switch layers after a oneshot event, we need to release the
542 * key before we leave the layer or no key up event will be generated. 561 * key before we leave the layer or no key up event will be generated.