summaryrefslogtreecommitdiff
path: root/tmk_core/common/action.c
diff options
context:
space:
mode:
authorNoah Andrews2016-03-28 18:37:39 -0400
committerNoah Andrews2016-03-28 18:37:39 -0400
commit535daad3cd812df58f4630df202a447836ac3084 (patch)
tree4591f47555acb1d88f08caa7ab3bbb40fd828637 /tmk_core/common/action.c
parentccf848917b7e931327f6c4a469877e9d8ef238ea (diff)
parent4a43c5684476611370820bd9592712754c211c52 (diff)
Merge remote-tracking branch 'jackhumbert/master' into improve-buildguide
Diffstat (limited to 'tmk_core/common/action.c')
-rw-r--r--tmk_core/common/action.c10
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