aboutsummaryrefslogtreecommitdiff
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 174faf856..19c3569d5 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); }
151 151
152__attribute__((weak)) bool process_record_quantum(keyrecord_t *record) { return true; } 152__attribute__((weak)) bool process_record_quantum(keyrecord_t *record) { return true; }
153 153
154__attribute__((weak)) void post_process_record_quantum(keyrecord_t *record) {}
155
154#ifndef NO_ACTION_TAPPING 156#ifndef NO_ACTION_TAPPING
155/** \brief Allows for handling tap-hold actions immediately instead of waiting for TAPPING_TERM or another keypress. 157/** \brief Allows for handling tap-hold actions immediately instead of waiting for TAPPING_TERM or another keypress.
156 * 158 *
@@ -185,6 +187,11 @@ void process_record(keyrecord_t *record) {
185 187
186 if (!process_record_quantum(record)) return; 188 if (!process_record_quantum(record)) return;
187 189
190 process_record_handler(record);
191 post_process_record_quantum(record);
192}
193
194void process_record_handler(keyrecord_t *record) {
188 action_t action = store_or_get_action(record->event.pressed, record->event.key); 195 action_t action = store_or_get_action(record->event.pressed, record->event.key);
189 dprint("ACTION: "); 196 dprint("ACTION: ");
190 debug_action(action); 197 debug_action(action);
@@ -988,7 +995,6 @@ bool is_tap_action(action_t action) {
988 * FIXME: Needs documentation. 995 * FIXME: Needs documentation.
989 */ 996 */
990void debug_event(keyevent_t event) { dprintf("%04X%c(%u)", (event.key.row << 8 | event.key.col), (event.pressed ? 'd' : 'u'), event.time); } 997void debug_event(keyevent_t event) { dprintf("%04X%c(%u)", (event.key.row << 8 | event.key.col), (event.pressed ? 'd' : 'u'), event.time); }
991
992/** \brief Debug print (FIXME: Needs better description) 998/** \brief Debug print (FIXME: Needs better description)
993 * 999 *
994 * FIXME: Needs documentation. 1000 * FIXME: Needs documentation.
diff --git a/tmk_core/common/action.h b/tmk_core/common/action.h
index 15f4ce15c..dd22023f9 100644
--- a/tmk_core/common/action.h
+++ b/tmk_core/common/action.h
@@ -84,6 +84,8 @@ void process_hand_swap(keyevent_t *record);
84 84
85void process_record_nocache(keyrecord_t *record); 85void process_record_nocache(keyrecord_t *record);
86void process_record(keyrecord_t *record); 86void process_record(keyrecord_t *record);
87void process_record_handler(keyrecord_t *record);
88void post_process_record_quantum(keyrecord_t *record);
87void process_action(keyrecord_t *record, action_t action); 89void process_action(keyrecord_t *record, action_t action);
88void register_code(uint8_t code); 90void register_code(uint8_t code);
89void unregister_code(uint8_t code); 91void unregister_code(uint8_t code);