From d415e99f0c3c562ee1fdc98d25e37202c05386c1 Mon Sep 17 00:00:00 2001 From: tmk Date: Sun, 28 Jan 2018 16:17:20 +0900 Subject: [PATCH] core: Add utility type_code() in aciton.h #528 --- tmk_core/common/action.c | 6 ++++++ tmk_core/common/action.h | 1 + 2 files changed, 7 insertions(+) diff --git a/tmk_core/common/action.c b/tmk_core/common/action.c index 305816d4..9b139d48 100644 --- a/tmk_core/common/action.c +++ b/tmk_core/common/action.c @@ -492,6 +492,12 @@ void unregister_code(uint8_t code) } } +void type_code(uint8_t code) +{ + register_code(code); + unregister_code(code); +} + void register_mods(uint8_t mods) { if (mods) { diff --git a/tmk_core/common/action.h b/tmk_core/common/action.h index 993fc463..84201897 100644 --- a/tmk_core/common/action.h +++ b/tmk_core/common/action.h @@ -62,6 +62,7 @@ void action_function(keyrecord_t *record, uint8_t id, uint8_t opt); void process_action(keyrecord_t *record); void register_code(uint8_t code); void unregister_code(uint8_t code); +void type_code(uint8_t code); void register_mods(uint8_t mods); void unregister_mods(uint8_t mods); //void set_mods(uint8_t mods); -- 2.46.2