summaryrefslogtreecommitdiffstats
path: root/tmk_core
diff options
context:
space:
mode:
Diffstat (limited to 'tmk_core')
-rw-r--r--tmk_core/common/action.c8
-rw-r--r--tmk_core/common/action.h2
2 files changed, 9 insertions, 1 deletions
diff --git a/tmk_core/common/action.c b/tmk_core/common/action.c
index 174faf856a..19c3569d55 100644
--- a/tmk_core/common/action.c
+++ b/tmk_core/common/action.c
@@ -151,6 +151,8 @@ void process_record_nocache(keyrecord_t *record) { process_record(record); }
__attribute__((weak)) bool process_record_quantum(keyrecord_t *record) { return true; }
+__attribute__((weak)) void post_process_record_quantum(keyrecord_t *record) {}
+
#ifndef NO_ACTION_TAPPING
/** \brief Allows for handling tap-hold actions immediately instead of waiting for TAPPING_TERM or another keypress.
*
@@ -185,6 +187,11 @@ void process_record(keyrecord_t *record) {
if (!process_record_quantum(record)) return;
+ process_record_handler(record);
+ post_process_record_quantum(record);
+}
+
+void process_record_handler(keyrecord_t *record) {
action_t action = store_or_get_action(record->event.pressed, record->event.key);
dprint("ACTION: ");
debug_action(action);
@@ -988,7 +995,6 @@ bool is_tap_action(action_t action) {
* FIXME: Needs documentation.
*/
void debug_event(keyevent_t event) { dprintf("%04X%c(%u)", (event.key.row << 8 | event.key.col), (event.pressed ? 'd' : 'u'), event.time); }
-
/** \brief Debug print (FIXME: Needs better description)
*
* FIXME: Needs documentation.
diff --git a/tmk_core/common/action.h b/tmk_core/common/action.h
index 15f4ce15c0..dd22023f9b 100644
--- a/tmk_core/common/action.h
+++ b/tmk_core/common/action.h
@@ -84,6 +84,8 @@ void process_hand_swap(keyevent_t *record);
void process_record_nocache(keyrecord_t *record);
void process_record(keyrecord_t *record);
+void process_record_handler(keyrecord_t *record);
+void post_process_record_quantum(keyrecord_t *record);
void process_action(keyrecord_t *record, action_t action);
void register_code(uint8_t code);
void unregister_code(uint8_t code);