X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=common%2Faction.c;h=94498fe6cb33e456069537ab9feffc721016e52c;hb=fa545c87f74833856761572ef631d20accc1d026;hp=f7ae85b94182c06b251ab82230a36ad37782ced5;hpb=eea3b699a6cf9976fc0179633feee6d079e5db78;p=tmk_firmware.git diff --git a/common/action.c b/common/action.c index f7ae85b..94498fe 100644 --- a/common/action.c +++ b/common/action.c @@ -128,6 +128,17 @@ void process_action(keyrecord_t *record) } break; #endif + case MODS_TAP_TOGGLE: + if (event.pressed) { + if (tap_count <= TAPPING_TOGGLE) { + register_mods(mods); + } + } else { + if (tap_count < TAPPING_TOGGLE) { + unregister_mods(mods); + } + } + break; default: if (event.pressed) { if (tap_count > 0) { @@ -283,7 +294,7 @@ void process_action(keyrecord_t *record) #ifdef BACKLIGHT_ENABLE case ACT_BACKLIGHT: if (!event.pressed) { - switch (action.backlight.id) { + switch (action.backlight.opt) { case BACKLIGHT_INCREASE: backlight_increase(); break; @@ -296,6 +307,9 @@ void process_action(keyrecord_t *record) case BACKLIGHT_STEP: backlight_step(); break; + case BACKLIGHT_LEVEL: + backlight_level(action.backlight.level); + break; } } break; @@ -485,13 +499,7 @@ void clear_keyboard_but_mods(void) #endif } -bool sending_anykey(void) -{ - return (has_anykey() || host_mouse_in_use() || - host_last_sysytem_report() || host_last_consumer_report()); -} - -bool is_tap_key(key_t key) +bool is_tap_key(keypos_t key) { action_t action = layer_switch_get_action(key);