diff options
Diffstat (limited to 'tmk_core/common/action.c')
-rw-r--r-- | tmk_core/common/action.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/tmk_core/common/action.c b/tmk_core/common/action.c index 77ea39e94..2ccc0e0b9 100644 --- a/tmk_core/common/action.c +++ b/tmk_core/common/action.c @@ -53,6 +53,9 @@ void action_exec(keyevent_t event) #endif } +__attribute__ ((weak)) +void process_action_kb(keyrecord_t *record) {} + void process_action(keyrecord_t *record) { keyevent_t event = record->event; @@ -62,6 +65,8 @@ void process_action(keyrecord_t *record) if (IS_NOEVENT(event)) { return; } + process_action_kb(record); + action_t action = layer_switch_get_action(event.key); dprint("ACTION: "); debug_action(action); #ifndef NO_ACTION_LAYER @@ -70,6 +75,10 @@ void process_action(keyrecord_t *record) #endif dprintln(); + if (event.pressed) { + // clear the potential weak mods left by previously pressed keys + clear_weak_mods(); + } switch (action.kind.id) { /* Key and Mods */ case ACT_LMODS: @@ -500,6 +509,7 @@ void clear_keyboard(void) void clear_keyboard_but_mods(void) { clear_weak_mods(); + clear_macro_mods(); clear_keys(); send_keyboard_report(); #ifdef MOUSEKEY_ENABLE |