diff options
Diffstat (limited to 'tmk_core/common')
| -rw-r--r-- | tmk_core/common/action.c | 12 | ||||
| -rw-r--r-- | tmk_core/common/action.h | 2 |
2 files changed, 13 insertions, 1 deletions
diff --git a/tmk_core/common/action.c b/tmk_core/common/action.c index 8bdcd54e3..456d1e25f 100644 --- a/tmk_core/common/action.c +++ b/tmk_core/common/action.c | |||
| @@ -851,6 +851,18 @@ void unregister_code(uint8_t code) | |||
| 851 | * | 851 | * |
| 852 | * FIXME: Needs documentation. | 852 | * FIXME: Needs documentation. |
| 853 | */ | 853 | */ |
| 854 | void tap_code(uint8_t code) { | ||
| 855 | register_code(code); | ||
| 856 | #if TAP_CODE_DELAY > 0 | ||
| 857 | wait_ms(TAP_CODE_DELAY); | ||
| 858 | #endif | ||
| 859 | unregister_code(code); | ||
| 860 | } | ||
| 861 | |||
| 862 | /** \brief Utilities for actions. (FIXME: Needs better description) | ||
| 863 | * | ||
| 864 | * FIXME: Needs documentation. | ||
| 865 | */ | ||
| 854 | void register_mods(uint8_t mods) | 866 | void register_mods(uint8_t mods) |
| 855 | { | 867 | { |
| 856 | if (mods) { | 868 | if (mods) { |
diff --git a/tmk_core/common/action.h b/tmk_core/common/action.h index 833febe9c..5d797fd62 100644 --- a/tmk_core/common/action.h +++ b/tmk_core/common/action.h | |||
| @@ -88,7 +88,7 @@ void process_record(keyrecord_t *record); | |||
| 88 | void process_action(keyrecord_t *record, action_t action); | 88 | void process_action(keyrecord_t *record, action_t action); |
| 89 | void register_code(uint8_t code); | 89 | void register_code(uint8_t code); |
| 90 | void unregister_code(uint8_t code); | 90 | void unregister_code(uint8_t code); |
| 91 | inline void tap_code(uint8_t code) { register_code(code); unregister_code(code); } | 91 | void tap_code(uint8_t code); |
| 92 | void register_mods(uint8_t mods); | 92 | void register_mods(uint8_t mods); |
| 93 | void unregister_mods(uint8_t mods); | 93 | void unregister_mods(uint8_t mods); |
| 94 | //void set_mods(uint8_t mods); | 94 | //void set_mods(uint8_t mods); |
