summaryrefslogtreecommitdiffstats
path: root/tmk_core/common
diff options
context:
space:
mode:
Diffstat (limited to 'tmk_core/common')
-rw-r--r--tmk_core/common/action.c12
-rw-r--r--tmk_core/common/action.h2
2 files changed, 13 insertions, 1 deletions
diff --git a/tmk_core/common/action.c b/tmk_core/common/action.c
index 8bdcd54e32..456d1e25fe 100644
--- a/tmk_core/common/action.c
+++ b/tmk_core/common/action.c
@@ -851,6 +851,18 @@ void unregister_code(uint8_t code)
*
* FIXME: Needs documentation.
*/
+void tap_code(uint8_t code) {
+ register_code(code);
+ #if TAP_CODE_DELAY > 0
+ wait_ms(TAP_CODE_DELAY);
+ #endif
+ unregister_code(code);
+}
+
+/** \brief Utilities for actions. (FIXME: Needs better description)
+ *
+ * FIXME: Needs documentation.
+ */
void register_mods(uint8_t mods)
{
if (mods) {
diff --git a/tmk_core/common/action.h b/tmk_core/common/action.h
index 833febe9ce..5d797fd628 100644
--- a/tmk_core/common/action.h
+++ b/tmk_core/common/action.h
@@ -88,7 +88,7 @@ void process_record(keyrecord_t *record);
void process_action(keyrecord_t *record, action_t action);
void register_code(uint8_t code);
void unregister_code(uint8_t code);
-inline void tap_code(uint8_t code) { register_code(code); unregister_code(code); }
+void tap_code(uint8_t code);
void register_mods(uint8_t mods);
void unregister_mods(uint8_t mods);
//void set_mods(uint8_t mods);