diff options
author | SjB <steve@sagacity.ca> | 2017-01-29 12:56:20 -0500 |
---|---|---|
committer | SjB <steve@sagacity.ca> | 2017-01-29 13:01:47 -0500 |
commit | 45e0d09414c09c626d2349b6a5036a29fe03b1c6 (patch) | |
tree | f458c4ea9f8a6a23626fb9f66bd8ffdc07f174df | |
parent | 6f44ca7a59d60e20c1d35e8edc916571f5fe40ef (diff) | |
download | qmk_firmware-45e0d09414c09c626d2349b6a5036a29fe03b1c6.tar.gz qmk_firmware-45e0d09414c09c626d2349b6a5036a29fe03b1c6.zip |
moved oneshot cancellation code outside of process_record.
The oneshot cancellation code do not depend on the
action_tapping_process and since process_record get called via the
action_tapping_process logic moved the oneshot cancellation code into
the action_exec function just before the action_tapping_process call
-rw-r--r-- | tmk_core/common/action.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/tmk_core/common/action.c b/tmk_core/common/action.c index a77177240b..f03670a7f7 100644 --- a/tmk_core/common/action.c +++ b/tmk_core/common/action.c @@ -49,6 +49,13 @@ void action_exec(keyevent_t event) keyrecord_t record = { .event = event }; +#if (defined(ONESHOT_TIMEOUT) && (ONESHOT_TIMEOUT > 0)) + if (has_oneshot_layer_timed_out()) { + dprintf("Oneshot layer: timeout\n"); + clear_oneshot_layer_state(ONESHOT_OTHER_KEY_PRESSED); + } +#endif + #ifndef NO_ACTION_TAPPING action_tapping_process(record); #else @@ -100,15 +107,8 @@ bool process_record_quantum(keyrecord_t *record) { return true; } -void process_record(keyrecord_t *record) +void process_record(keyrecord_t *record) { -#if (defined(ONESHOT_TIMEOUT) && (ONESHOT_TIMEOUT > 0)) - if (has_oneshot_layer_timed_out()) { - dprintf("Oneshot layer: timeout\n"); - clear_oneshot_layer_state(ONESHOT_OTHER_KEY_PRESSED); - } -#endif - if (IS_NOEVENT(record->event)) { return; } if(!process_record_quantum(record)) |