X-Git-Url: https://git.friedersdorff.com/?a=blobdiff_plain;f=tmk_core%2Fcommon%2Faction.c;h=9b139d48b155828b0aa9845f9e564c92d04d0b7e;hb=4e83400fc6f67a0559cf343ba5846b505c35fd30;hp=ab6e9d895807898fde8b7112eadfb0eb8053b9e1;hpb=c0f09090512f026ff40554637a7b3ce42c98f204;p=max%2Ftmk_keyboard.git diff --git a/tmk_core/common/action.c b/tmk_core/common/action.c index ab6e9d89..9b139d48 100644 --- a/tmk_core/common/action.c +++ b/tmk_core/common/action.c @@ -65,7 +65,7 @@ void process_action(keyrecord_t *record) if (IS_NOEVENT(event)) { return; } - action_t action = layer_switch_get_action(event.key); + action_t action = layer_switch_get_action(event); dprint("ACTION: "); debug_action(action); #ifndef NO_ACTION_LAYER dprint(" layer_state: "); layer_debug(); @@ -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) { @@ -529,9 +535,11 @@ void clear_keyboard_but_mods(void) #endif } -bool is_tap_key(keypos_t key) +bool is_tap_key(keyevent_t event) { - action_t action = layer_switch_get_action(key); + if (IS_NOEVENT(event)) { return false; } + + action_t action = layer_switch_get_action(event); switch (action.kind.id) { case ACT_LMODS_TAP: