summaryrefslogtreecommitdiff
path: root/tmk_core/common/action.c
diff options
context:
space:
mode:
authorManuel Barkhau <mb@nexttuesday.de>2016-03-28 21:36:02 +0000
committerManuel Barkhau <mb@nexttuesday.de>2016-03-28 21:36:02 +0000
commit295036d4e3f11aa00392f3315f549b15fe66846f (patch)
tree5e9144a61c12d8e26e93fbb16a5a79605702c7a4 /tmk_core/common/action.c
parent32c7832609414d02c19b6ec312daabc8c741b266 (diff)
parent4a43c5684476611370820bd9592712754c211c52 (diff)
downloadqmk_firmware-295036d4e3f11aa00392f3315f549b15fe66846f.tar.gz
qmk_firmware-295036d4e3f11aa00392f3315f549b15fe66846f.zip
Merge remote-tracking branch 'origin/master'
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 77ea39e942..2ccc0e0b94 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