diff options
author | Konstantin Đorđević <[email protected]> | 2018-12-28 20:07:56 +0100 |
---|---|---|
committer | MechMerlin <[email protected]> | 2018-12-28 11:07:56 -0800 |
commit | 93b004c943a4b13bd640fc83000e910b72cb4640 (patch) | |
tree | 48bde7eb31533cc3690f5638a2803deadfea0fc0 /tmk_core/common/action.c | |
parent | fbcbf4492685108a7f257df4e06871abd9def4d7 (diff) | |
download | qmk_firmware-93b004c943a4b13bd640fc83000e910b72cb4640.tar.gz qmk_firmware-93b004c943a4b13bd640fc83000e910b72cb4640.zip |
Keep pressed keys on layer state change (fixes #2053, #2279) (#3905)0.6.215
* Keep pressed keys on layer state change
* Add doc comment for clear_keyboard_but_mods_and_keys
* Keep pressed keys only if PREVENT_STUCK_MODIFIERS is on
* Check STRICT_LAYER_RELEASE instead of PREVENT_STUCK_MODIFIERS
Diffstat (limited to 'tmk_core/common/action.c')
-rw-r--r-- | tmk_core/common/action.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/tmk_core/common/action.c b/tmk_core/common/action.c index 456d1e25fe..b99c2acaa7 100644 --- a/tmk_core/common/action.c +++ b/tmk_core/common/action.c @@ -899,9 +899,18 @@ void clear_keyboard(void) */ void clear_keyboard_but_mods(void) { + clear_keys(); + clear_keyboard_but_mods_and_keys(); +} + +/** \brief Utilities for actions. (FIXME: Needs better description) + * + * FIXME: Needs documentation. + */ +void clear_keyboard_but_mods_and_keys() +{ clear_weak_mods(); clear_macro_mods(); - clear_keys(); send_keyboard_report(); #ifdef MOUSEKEY_ENABLE mousekey_clear(); |