summaryrefslogtreecommitdiff
path: root/tmk_core/common
diff options
context:
space:
mode:
authorJack Humbert <jack.humb@gmail.com>2017-02-06 18:57:23 -0500
committerGitHub <noreply@github.com>2017-02-06 18:57:23 -0500
commitb6ffda484971306264c8c95facf75eec4c85b62a (patch)
tree90310202cf0701a022fcbed62715a711af8f7e7d /tmk_core/common
parent449ab9109ab0d04944de8430d8d910cf7f1e8856 (diff)
parent45e0d09414c09c626d2349b6a5036a29fe03b1c6 (diff)
Merge pull request #1010 from SjB/oneshot_timeout_fix
oneshot timeout would only timeout after an event.
Diffstat (limited to 'tmk_core/common')
-rw-r--r--tmk_core/common/action.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/tmk_core/common/action.c b/tmk_core/common/action.c
index d485b46c77..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,7 +107,7 @@ bool process_record_quantum(keyrecord_t *record) {
return true;
}
-void process_record(keyrecord_t *record)
+void process_record(keyrecord_t *record)
{
if (IS_NOEVENT(record->event)) { return; }
@@ -126,13 +133,6 @@ void process_action(keyrecord_t *record, action_t action)
uint8_t tap_count = record->tap.count;
#endif
-#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 (event.pressed) {
// clear the potential weak mods left by previously pressed keys
clear_weak_mods();