From: tmk Date: Sun, 28 Jan 2018 07:17:20 +0000 (+0900) Subject: core: Add utility type_code() in aciton.h #528 X-Git-Url: https://git.friedersdorff.com/?a=commitdiff_plain;h=d415e99f0c3c562ee1fdc98d25e37202c05386c1;p=max%2Ftmk_keyboard.git core: Add utility type_code() in aciton.h #528 --- 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);