]> git.donarmstrong.com Git - qmk_firmware.git/blobdiff - tmk_core/common/action.c
moved oneshot cancellation code outside of process_record.
[qmk_firmware.git] / tmk_core / common / action.c
index a77177240badd889ffa2f264996b31c9dbc93dcd..f03670a7f74d9d4ed4d42aa33672b5069c5c9909 100644 (file)
@@ -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))