X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=common%2Faction.h;h=077711c231a3fffb0640fa35784323724a555cf2;hb=772ab7025ddf88126d9d6ddb654f62434985504b;hp=5f659337f9706fba99b6e9202728fed588b998db;hpb=ebe798f081ce018826dc882a40fc77ec8a0ad023;p=tmk_firmware.git diff --git a/common/action.h b/common/action.h index 5f65933..077711c 100644 --- a/common/action.h +++ b/common/action.h @@ -25,18 +25,20 @@ along with this program. If not, see . #include "action_macro.h" +/* tapping count and state */ +typedef struct { + bool interrupted :1; + bool reserved2 :1; + bool reserved1 :1; + bool reserved0 :1; + uint8_t count :4; +} tap_t; + /* Key event container for recording */ typedef struct { keyevent_t event; #ifndef NO_ACTION_TAPPING - /* tapping count and state */ - struct { - bool interrupted :1; - bool reserved2 :1; - bool reserved1 :1; - bool reserved0 :1; - uint8_t count :4; - } tap; + tap_t tap; #endif } keyrecord_t; @@ -48,7 +50,7 @@ void action_exec(keyevent_t event); action_t action_for_key(uint8_t layer, key_t key); /* macro */ -const prog_macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt); +const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt); /* user defined special function */ void action_function(keyrecord_t *record, uint8_t id, uint8_t opt); @@ -57,12 +59,11 @@ 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 add_mods(uint8_t mods); -void del_mods(uint8_t mods); -void set_mods(uint8_t mods); +void register_mods(uint8_t mods); +void unregister_mods(uint8_t mods); +//void set_mods(uint8_t mods); void clear_keyboard(void); void clear_keyboard_but_mods(void); -bool sending_anykey(void); void layer_switch(uint8_t new_layer); bool is_tap_key(key_t key);