diff options
| author | Isaac Elenbaas <isaacelenbaas@gmail.com> | 2021-02-27 23:48:19 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-02-28 15:48:19 +1100 |
| commit | 765d8a33ddb46ae25314189b80f6ba04136ec808 (patch) | |
| tree | 4c0115b98ed95a399a727efdf3057c1c7d9d3836 | |
| parent | 58e733b5a0301bd8902d46b80f47a92b73e219f5 (diff) | |
| download | qmk_firmware-765d8a33ddb46ae25314189b80f6ba04136ec808.tar.gz qmk_firmware-765d8a33ddb46ae25314189b80f6ba04136ec808.zip | |
Fixes #4072, #6214. Revision of #156 to clear before AS/TD. (#9941)
| -rw-r--r-- | tmk_core/common/action.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/tmk_core/common/action.c b/tmk_core/common/action.c index f53e3c708..aae5cbfa5 100644 --- a/tmk_core/common/action.c +++ b/tmk_core/common/action.c | |||
| @@ -76,6 +76,11 @@ void action_exec(keyevent_t event) { | |||
| 76 | #endif | 76 | #endif |
| 77 | } | 77 | } |
| 78 | 78 | ||
| 79 | if (event.pressed) { | ||
| 80 | // clear the potential weak mods left by previously pressed keys | ||
| 81 | clear_weak_mods(); | ||
| 82 | } | ||
| 83 | |||
| 79 | #ifdef SWAP_HANDS_ENABLE | 84 | #ifdef SWAP_HANDS_ENABLE |
| 80 | if (!IS_NOEVENT(event)) { | 85 | if (!IS_NOEVENT(event)) { |
| 81 | process_hand_swap(&event); | 86 | process_hand_swap(&event); |
| @@ -237,11 +242,6 @@ void process_action(keyrecord_t *record, action_t action) { | |||
| 237 | uint8_t tap_count = record->tap.count; | 242 | uint8_t tap_count = record->tap.count; |
| 238 | #endif | 243 | #endif |
| 239 | 244 | ||
| 240 | if (event.pressed) { | ||
| 241 | // clear the potential weak mods left by previously pressed keys | ||
| 242 | clear_weak_mods(); | ||
| 243 | } | ||
| 244 | |||
| 245 | #ifndef NO_ACTION_ONESHOT | 245 | #ifndef NO_ACTION_ONESHOT |
| 246 | bool do_release_oneshot = false; | 246 | bool do_release_oneshot = false; |
| 247 | // notice we only clear the one shot layer if the pressed key is not a modifier. | 247 | // notice we only clear the one shot layer if the pressed key is not a modifier. |
