From b7a81f041906c3c978a314987e486536be0a58cd Mon Sep 17 00:00:00 2001 From: Didier Loiseau Date: Tue, 8 Mar 2016 23:14:15 +0100 Subject: Fix #156: clear weak mods on every key press - new macro_mods bit field for mods applied by macros - weak_mods now only used for ACT_{L,R}MODS (i.e. LSFT, RSFT, LCTL etc.) - clear the _weak_ mods on every key *pressed* such that LSFT etc. can no more interfere with the next key --- tmk_core/common/action.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'tmk_core/common/action.c') diff --git a/tmk_core/common/action.c b/tmk_core/common/action.c index 77ea39e94..4197c53ed 100644 --- a/tmk_core/common/action.c +++ b/tmk_core/common/action.c @@ -70,6 +70,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 +504,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 -- cgit v1.2.3-24-g4f1b