]> git.friedersdorff.com Git - max/tmk_keyboard.git/commitdiff
core: Add utility type_code() in aciton.h #528
authortmk <hasu@tmk-kbd.com>
Sun, 28 Jan 2018 07:17:20 +0000 (16:17 +0900)
committertmk <hasu@tmk-kbd.com>
Sun, 28 Jan 2018 07:17:20 +0000 (16:17 +0900)
tmk_core/common/action.c
tmk_core/common/action.h

index 305816d4f0ccbcaad729f87663767415b527741f..9b139d48b155828b0aa9845f9e564c92d04d0b7e 100644 (file)
@@ -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) {
index 993fc463ff6de196f0ee2412740012d78710850d..84201897ff43d5ec527fea0e2bd525f8bbb26c0f 100644 (file)
@@ -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);